OpaquePtr: Require byval on x86_intrcc parameter 0
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Thu, 19 Nov 2020 23:53:28 +0000 (18:53 -0500)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Mon, 14 Dec 2020 21:34:37 +0000 (16:34 -0500)
commit2e0e03c6a089da39039ec3f464f7cee5df86646b
treeb33fe29a0655b929db23e619def013c4d7b79800
parentef4da3c2ba8a812a695361d786e3de8a8b2cd482
OpaquePtr: Require byval on x86_intrcc parameter 0

Currently the backend special cases x86_intrcc and treats the first
parameter as byval. Make the IR require byval for this parameter to
remove this special case, and avoid the dependence on the pointee
element type.

Fixes bug 46672.

I'm not sure the IR is enforcing all the calling convention
constraints. clang seems to ignore the attribute for empty parameter
lists, but the IR tolerates it.
16 files changed:
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
llvm/lib/IR/AutoUpgrade.cpp
llvm/lib/IR/Verifier.cpp
llvm/test/Assembler/x86_intrcc.ll [new file with mode: 0644]
llvm/test/Bitcode/Inputs/x86_intrcc_upgrade.bc [new file with mode: 0644]
llvm/test/Bitcode/compatibility-6.0.ll
llvm/test/Bitcode/compatibility.ll
llvm/test/Bitcode/x86_intr-upgrade.test [new file with mode: 0644]
llvm/test/CodeGen/X86/x86-32-intrcc.ll
llvm/test/CodeGen/X86/x86-64-intrcc-nosse.ll
llvm/test/CodeGen/X86/x86-64-intrcc.ll
llvm/test/CodeGen/X86/x86-interrupt_cc.ll
llvm/test/CodeGen/X86/x86-interrupt_cld.ll
llvm/test/CodeGen/X86/x86-interrupt_vzeroupper.ll
llvm/test/CodeGen/X86/x86-no_caller_saved_registers.ll
llvm/test/Verifier/x86_intr.ll [new file with mode: 0644]