[PATCH] D24273: AMDGPU: Fix immediate folding logic when shrinking instructions
Nicolai Hähnle via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 8 01:29:50 PDT 2016
nhaehnle accepted this revision.
nhaehnle added a reviewer: nhaehnle.
nhaehnle added a comment.
This revision is now accepted and ready to land.
LGTM. One comment below.
================
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]+}}
----------------
Wouldn't it be even better to use s_brev_b32 sNN, 1 here?
https://reviews.llvm.org/D24273
More information about the llvm-commits
mailing list