summaryrefslogtreecommitdiff
path: root/test/CodeGen/PowerPC/testComparesllgeuc.ll
diff options
context:
space:
mode:
authorNemanja Ivanovic <nemanja.i.ibm@gmail.com>2017-12-12 12:09:34 +0000
committerNemanja Ivanovic <nemanja.i.ibm@gmail.com>2017-12-12 12:09:34 +0000
commit28016c6005d2bcd51378bcc43e1f57944be22e16 (patch)
tree5c77e34f24f39063360df66dc284e5e79983082f /test/CodeGen/PowerPC/testComparesllgeuc.ll
parentefc3af1a052dac3a08bea7c5288937c5f147606e (diff)
[PowerPC] Follow-up to r318436 to get the missed CSE opportunities
The last of the three patches that https://reviews.llvm.org/D40348 was broken up into. Canonicalize the materialization of constants so that they are more likely to be CSE'd regardless of the bit-width of the use. If a constant can be materialized using PPC::LI, materialize it the same way always. For example: li 4, -1 li 4, 255 li 4, 65535 are equivalent if the uses only use the low byte. Canonicalize it to the first form. Differential Revision: https://reviews.llvm.org/D40348 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320473 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/PowerPC/testComparesllgeuc.ll')
-rw-r--r--test/CodeGen/PowerPC/testComparesllgeuc.ll2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/CodeGen/PowerPC/testComparesllgeuc.ll b/test/CodeGen/PowerPC/testComparesllgeuc.ll
index 6369cdc23d9..e56e09b37ac 100644
--- a/test/CodeGen/PowerPC/testComparesllgeuc.ll
+++ b/test/CodeGen/PowerPC/testComparesllgeuc.ll
@@ -105,7 +105,7 @@ entry:
store i8 %conv1, i8* @glob
ret void
; CHECK-LABEL: @test_llgeuc_sext_z_store
-; CHECK: li [[REG1:r[0-9]+]], 255
+; CHECK: li [[REG1:r[0-9]+]], -1
; CHECK: stb [[REG1]]
; CHECK: blr
}