summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/PowerPC/setcc-logic.ll
diff options
context:
space:
mode:
authorNemanja Ivanovic <nemanja.i.ibm@gmail.com>2017-12-15 07:27:53 +0000
committerNemanja Ivanovic <nemanja.i.ibm@gmail.com>2017-12-15 07:27:53 +0000
commit6995e5dae78d20c7e04ef5cdc259ee5cc1eb4e57 (patch)
tree66d8147a1b333df5f115fda9b09149f32f7be763 /llvm/test/CodeGen/PowerPC/setcc-logic.ll
parent7cfacbf6ea8222b61742e9734506432c59da21f4 (diff)
downloadbcm5719-llvm-6995e5dae78d20c7e04ef5cdc259ee5cc1eb4e57.tar.gz
bcm5719-llvm-6995e5dae78d20c7e04ef5cdc259ee5cc1eb4e57.zip
[PowerPC] Convert r+r instructions to r+i (pre and post RA)
This patch adds the necessary infrastructure to convert instructions that take two register operands to those that take a register and immediate if the necessary operand is produced by a load-immediate. Furthermore, it uses this infrastructure to perform such conversions twice - first at MachineSSA and then pre-emit. There are a number of reasons we may end up with opportunities for this transformation, including but not limited to: - X-Form instructions chosen since the exact offset isn't available at ISEL time - Atomic instructions with constant operands (we will add patterns for this in the future) - Tail duplication may duplicate code where one block contains this redundancy - When emitting compare-free code in PPCDAGToDAGISel, we don't handle constant comparands specially Furthermore, this patch moves the initialization of PPCMIPeepholePass so that it can be used for MIR tests. llvm-svn: 320791
Diffstat (limited to 'llvm/test/CodeGen/PowerPC/setcc-logic.ll')
-rw-r--r--llvm/test/CodeGen/PowerPC/setcc-logic.ll4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/test/CodeGen/PowerPC/setcc-logic.ll b/llvm/test/CodeGen/PowerPC/setcc-logic.ll
index b17869f312c..d27538fb8d5 100644
--- a/llvm/test/CodeGen/PowerPC/setcc-logic.ll
+++ b/llvm/test/CodeGen/PowerPC/setcc-logic.ll
@@ -418,9 +418,9 @@ define <4 x i1> @any_sign_bits_clear_vec(<4 x i32> %P, <4 x i32> %Q) {
define zeroext i1 @ne_neg1_and_ne_zero(i64 %x) {
; CHECK-LABEL: ne_neg1_and_ne_zero:
; CHECK: # %bb.0:
-; CHECK-NEXT: li 4, 1
; CHECK-NEXT: addi 3, 3, 1
-; CHECK-NEXT: subfc 3, 3, 4
+; CHECK-NEXT: li 4, 1
+; CHECK-NEXT: subfic 3, 3, 1
; CHECK-NEXT: subfe 3, 4, 4
; CHECK-NEXT: neg 3, 3
; CHECK-NEXT: blr
OpenPOWER on IntegriCloud