Changes

Summary

  1. Revert "Properly convert all declaration non-type template arguments (details)
  2. Reland [MachineCopyPropagation] Extend MCP to do trivial copy backward (details)
  3. Fix the macro fusion table for X86 according to Intel optimization (details)
Commit 93cc9dddd82f9e971f382ade6acf6634c5914966 by dlj
Revert "Properly convert all declaration non-type template arguments
when"
This reverts commit 11d10527852b4d3ed738aa90d8bec0f398160593.
This change is problematic with function pointer template parameters.
For example, building libcxxabi with futexes (-D_LIBCXXABI_USE_FUTEX)
produces this diagnostic:
    In file included from
.../llvm-project/libcxxabi/src/cxa_guard.cpp:15:
   .../llvm-project/libcxxabi/src/cxa_guard_impl.h:416:54: error:
address of function 'PlatformThreadID' will always evaluate to 'true'
[-Werror,-Wpointer-bool-conversion]
       has_thread_id_support(this->thread_id_address && GetThreadIDArg),
                                                     ~~ ^~~~~~~~~~~~~~
   .../llvm-project/libcxxabi/src/cxa_guard.cpp:38:26: note: in
instantiation of member function '__cxxabiv1::(anonymous
namespace)::InitByteFutex<&__cxxabiv1::(anonymous
namespace)::PlatformFutexWait, &__cxxabiv1::(anonymous
namespace)::PlatformFutexWake, &__cxxabiv1::(anonymous
namespace)::PlatformThreadID>::InitByteFutex' requested here
     SelectedImplementation imp(raw_guard_object);
                            ^
   .../llvm-project/libcxxabi/src/cxa_guard_impl.h:416:54: note: prefix
with the address-of operator to silence this warning
       has_thread_id_support(this->thread_id_address && GetThreadIDArg),
                                                        ^
                                                        &
   1 error generated.
The diagnostic is incorrect: adding the address-of operator also fails
("cannot take the address of an rvalue of type 'uint32_t (*)()' (aka
'unsigned int
(*)()')").
The file was modifiedclang/lib/Sema/SemaTemplate.cpp
The file was modifiedclang/test/SemaTemplate/temp_arg_nontype_cxx1z.cpp
The file was modifiedclang/test/SemaCXX/exceptions-seh.cpp
Commit b200c5180e8d6f9ac4e08512a04739ab02cebdb8 by lkail
Reland [MachineCopyPropagation] Extend MCP to do trivial copy backward
propagation.
Fix assertion error
``` bool llvm::MachineOperand::isRenamable() const: Assertion
`Register::isPhysicalRegister(getReg()) && "isRenamable should only be
checked on physical registers"' failed.
``` by checking if the register is 0 before invoking `isRenamable`.
The file was modifiedllvm/test/CodeGen/RISCV/shifts.ll
The file was modifiedllvm/test/CodeGen/PowerPC/redundant-copy-after-tail-dup.ll
The file was modifiedllvm/test/CodeGen/X86/umulo-128-legalisation-lowering.ll
The file was modifiedllvm/test/CodeGen/PowerPC/machine-backward-cp.mir
The file was modifiedllvm/test/CodeGen/X86/fp128-i128.ll
The file was modifiedllvm/test/CodeGen/X86/i128-mul.ll
The file was modifiedllvm/test/CodeGen/X86/fshr.ll
The file was modifiedllvm/test/CodeGen/X86/mul-i512.ll
The file was modifiedllvm/test/CodeGen/RISCV/alu64.ll
The file was modifiedllvm/lib/CodeGen/MachineCopyPropagation.cpp
The file was modifiedllvm/test/CodeGen/X86/shift-i128.ll
Commit f3dafd21a36f33f3829a4c81260ff5809c065111 by shengchen.kan
Fix the macro fusion table for X86 according to Intel optimization
manual and add function isMacroFused
Differential Revision: https://reviews.llvm.org/D70999
The file was modifiedllvm/lib/Target/X86/MCTargetDesc/X86BaseInfo.h
The file was modifiedllvm/lib/Target/X86/X86MacroFusion.cpp