[PATCH] D17940: SelectionDAG: Fix a crash on inline asm when output register supports multiple types

Tom Stellard via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 7 14:17:27 PST 2016


tstellarAMD added inline comments.

================
Comment at: test/CodeGen/AMDGPU/inline-asm.ll:50
@@ +49,3 @@
+define void @v_cmp_asm(i64 addrspace(1)* %out, i32 %in) {
+  %sgpr = tail call i64 asm "v_cmp_ne_i32_e64 $0, 0, $1", "=s,v"(i32 %in)
+  store i64 %sgpr, i64 addrspace(1)* %out
----------------
arsenm wrote:
> Shouldn't this have an i1 return type?
No, this test case comes from an inline asm implementation of hsail's activelanemask.  I need to return a mask containing the true/false values for each thread.  If I use i1, I will need to sign extend the value in order to store it, and I will get either 0 or -1 instead of the lane mask.


http://reviews.llvm.org/D17940





More information about the llvm-commits mailing list