[PATCH] D51795: AMDGPU: Don't error on calls to constexpr casts of functions

Scott Linder via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 11 15:34:13 PDT 2018


scott.linder added a comment.

Seems to be related to the order; this succeeds:

  %struct.foo = type { i64, i64, i64, [104 x i8], [1 x i8] }
  %struct.pluto = type opaque
  
  define void @barney(%struct.foo addrspace(1)* nocapture %arg, i64 %arg1, i32 %arg2, i32 %arg3) {
  bb:
    ret void
  }
  
  define void @wombat() {
  bb:
    call void bitcast (void (%struct.foo addrspace(1)*, i64, i32, i32)* @barney to void (%struct.foo addrspace(1)*, %struct.pluto addrspace(1)*, i32, i32)*)(%struct.foo addrspace(1)* undef, %struct.pluto addrspace(1)* undef, i32 4, i32 4)
    ret void
  }

It seems like if SelectionDAGBuilder does LowerCall for the caller before it does LowerFormalArguments for the callee we fail in SITargetLowering::passSpecialInputs because we have not filled in ArgInfoMap for the callee yet. Without the bitcast is this dependency somehow enforced?


https://reviews.llvm.org/D51795





More information about the llvm-commits mailing list