summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/SystemZ/atomicrmw-add-01.ll
diff options
context:
space:
mode:
authorRichard Sandiford <rsandifo@linux.vnet.ibm.com>2013-07-31 11:36:35 +0000
committerRichard Sandiford <rsandifo@linux.vnet.ibm.com>2013-07-31 11:36:35 +0000
commit6a06ba36ba5f8466c07f5f097524ae064ac80e46 (patch)
tree25528ca8996198a0cf0400f031dc6979824fc45b /llvm/test/CodeGen/SystemZ/atomicrmw-add-01.ll
parent67b05fc0b3156396e050dd44cc8c2011622b2449 (diff)
downloadbcm5719-llvm-6a06ba36ba5f8466c07f5f097524ae064ac80e46.tar.gz
bcm5719-llvm-6a06ba36ba5f8466c07f5f097524ae064ac80e46.zip
[SystemZ] Postpone NI->RISBG conversion to convertToThreeAddress()
r186399 aggressively used the RISBG instruction for immediate ANDs, both because it can handle some values that AND IMMEDIATE can't, and because it allows the destination register to be different from the source. I realized later while implementing the distinct-ops support that it would be better to leave the choice up to convertToThreeAddress() instead. The AND IMMEDIATE form is shorter and is less likely to be cracked. This is a problem for 32-bit ANDs because we assume that all 32-bit operations will leave the high word untouched, whereas RISBG used in this way will either clear the high word or copy it from the source register. The patch uses the z196 instruction RISBLG for this instead. This means that z10 will be restricted to NILL, NILH and NILF for 32-bit ANDs, but I think that should be OK for now. Although we're using z10 as the base architecture, the optimization work is going to be focused more on z196 and zEC12. llvm-svn: 187492
Diffstat (limited to 'llvm/test/CodeGen/SystemZ/atomicrmw-add-01.ll')
-rw-r--r--llvm/test/CodeGen/SystemZ/atomicrmw-add-01.ll16
1 files changed, 8 insertions, 8 deletions
diff --git a/llvm/test/CodeGen/SystemZ/atomicrmw-add-01.ll b/llvm/test/CodeGen/SystemZ/atomicrmw-add-01.ll
index 2e1947fcf76..2c8598ddd22 100644
--- a/llvm/test/CodeGen/SystemZ/atomicrmw-add-01.ll
+++ b/llvm/test/CodeGen/SystemZ/atomicrmw-add-01.ll
@@ -14,14 +14,14 @@
; instructions.
define i8 @f1(i8 *%src, i8 %b) {
; CHECK-LABEL: f1:
-; CHECK-DAG: sllg [[SHIFT:%r[1-9]+]], %r2, 3
-; CHECK-DAG: risbg [[BASE:%r[1-9]+]], %r2, 0, 189, 0
-; CHECK: l [[OLD:%r[0-9]+]], 0([[BASE]])
+; CHECK: sllg [[SHIFT:%r[1-9]+]], %r2, 3
+; CHECK: nill %r2, 65532
+; CHECK: l [[OLD:%r[0-9]+]], 0(%r2)
; CHECK: [[LABEL:\.[^:]*]]:
; CHECK: rll [[ROT:%r[0-9]+]], [[OLD]], 0([[SHIFT]])
; CHECK: ar [[ROT]], %r3
; CHECK: rll [[NEW:%r[0-9]+]], [[ROT]], 0({{%r[1-9]+}})
-; CHECK: cs [[OLD]], [[NEW]], 0([[BASE]])
+; CHECK: cs [[OLD]], [[NEW]], 0(%r2)
; CHECK: jlh [[LABEL]]
; CHECK: rll %r2, [[OLD]], 8([[SHIFT]])
; CHECK: br %r14
@@ -48,14 +48,14 @@ define i8 @f1(i8 *%src, i8 %b) {
; Check the minimum signed value. We add 0x80000000 to the rotated word.
define i8 @f2(i8 *%src) {
; CHECK-LABEL: f2:
-; CHECK-DAG: sllg [[SHIFT:%r[1-9]+]], %r2, 3
-; CHECK-DAG: risbg [[BASE:%r[1-9]+]], %r2, 0, 189, 0
-; CHECK: l [[OLD:%r[0-9]+]], 0([[BASE]])
+; CHECK: sllg [[SHIFT:%r[1-9]+]], %r2, 3
+; CHECK: nill %r2, 65532
+; CHECK: l [[OLD:%r[0-9]+]], 0(%r2)
; CHECK: [[LABEL:\.[^:]*]]:
; CHECK: rll [[ROT:%r[0-9]+]], [[OLD]], 0([[SHIFT]])
; CHECK: afi [[ROT]], -2147483648
; CHECK: rll [[NEW:%r[0-9]+]], [[ROT]], 0([[NEGSHIFT:%r[1-9]+]])
-; CHECK: cs [[OLD]], [[NEW]], 0([[BASE]])
+; CHECK: cs [[OLD]], [[NEW]], 0(%r2)
; CHECK: jlh [[LABEL]]
; CHECK: rll %r2, [[OLD]], 8([[SHIFT]])
; CHECK: br %r14
OpenPOWER on IntegriCloud