[PATCH] D24273: AMDGPU: Fix immediate folding logic when shrinking instructions

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 8 10:05:26 PDT 2016


arsenm added inline comments.

================
Comment at: test/CodeGen/AMDGPU/fneg-fabs.ll:85-86
@@ -84,3 +84,4 @@
 
-; SI: v_or_b32_e32 v{{[0-9]+}}, 0x80000000, v{{[0-9]+}}
-; SI: v_or_b32_e32 v{{[0-9]+}}, 0x80000000, v{{[0-9]+}}
+; FIXME: In this case two uses of the constant should be folded
+; SI: s_mov_b32 [[SIGNBITK:s[0-9]+]], 0x80000000
+; SI: v_or_b32_e32 v{{[0-9]+}}, [[SIGNBITK]], v{{[0-9]+}}
----------------
nhaehnle wrote:
> Wouldn't it be even better to use s_brev_b32 sNN, 1 here?
Yes, I forgot about the scalar case when I added the bfrev thing


https://reviews.llvm.org/D24273





More information about the llvm-commits mailing list