summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/PowerPC/CSR-fit.ll
diff options
context:
space:
mode:
authorKang Zhang <shkzhang@cn.ibm.com>2019-12-26 02:12:32 +0000
committerKang Zhang <shkzhang@cn.ibm.com>2019-12-26 02:12:32 +0000
commit6d88b7d6e712789115c149c5abb0f359d1222545 (patch)
treed98ef508266356c4ef90716b3f05a24b1ef5eb0d /llvm/test/CodeGen/PowerPC/CSR-fit.ll
parent6cf6f7dc96d55af63a15fb73499bf81d00f969b3 (diff)
downloadbcm5719-llvm-6d88b7d6e712789115c149c5abb0f359d1222545.tar.gz
bcm5719-llvm-6d88b7d6e712789115c149c5abb0f359d1222545.zip
[PowerPC] Modify the hasSideEffects of MTLR and MFLR from 1 to 0
Summary: If we didn't set the value for hasSideEffects bit in our td file, `llvm-tblgen` will set it as true for those instructions which has no match pattern. The instructions `MTLR` and `MFLR` don't set the hasSideEffects flag and don't have match pattern, so their hasSideEffects flag will be set true by `llvm-tblgen`. But in fact, we can use `[LR]` to model the two instructions, so they should not have SideEffects. This patch is to modify the hasSideEffects of MTLR and MFLR from 1 to 0. Reviewed By: jsji Differential Revision: https://reviews.llvm.org/D71390
Diffstat (limited to 'llvm/test/CodeGen/PowerPC/CSR-fit.ll')
-rw-r--r--llvm/test/CodeGen/PowerPC/CSR-fit.ll8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/test/CodeGen/PowerPC/CSR-fit.ll b/llvm/test/CodeGen/PowerPC/CSR-fit.ll
index 49bfc79eb4c..ebaffdb0534 100644
--- a/llvm/test/CodeGen/PowerPC/CSR-fit.ll
+++ b/llvm/test/CodeGen/PowerPC/CSR-fit.ll
@@ -27,9 +27,9 @@ define dso_local signext i32 @caller1(i32 signext %a, i32 signext %b) local_unna
; CHECK-PWR8-NEXT: nop
; CHECK-PWR8-NEXT: addi r1, r1, 176
; CHECK-PWR8-NEXT: ld r0, 16(r1)
-; CHECK-PWR8-NEXT: mtlr r0
; CHECK-PWR8-NEXT: ld r15, -136(r1) # 8-byte Folded Reload
; CHECK-PWR8-NEXT: ld r14, -144(r1) # 8-byte Folded Reload
+; CHECK-PWR8-NEXT: mtlr r0
; CHECK-PWR8-NEXT: blr
;
; CHECK-PWR9-LABEL: caller1:
@@ -51,9 +51,9 @@ define dso_local signext i32 @caller1(i32 signext %a, i32 signext %b) local_unna
; CHECK-PWR9-NEXT: nop
; CHECK-PWR9-NEXT: addi r1, r1, 176
; CHECK-PWR9-NEXT: ld r0, 16(r1)
-; CHECK-PWR9-NEXT: mtlr r0
; CHECK-PWR9-NEXT: ld r15, -136(r1) # 8-byte Folded Reload
; CHECK-PWR9-NEXT: ld r14, -144(r1) # 8-byte Folded Reload
+; CHECK-PWR9-NEXT: mtlr r0
; CHECK-PWR9-NEXT: blr
entry:
%0 = tail call i32 asm "add $0, $1, $2", "=r,r,r,~{r14},~{r15}"(i32 %a, i32 %b)
@@ -81,9 +81,9 @@ define dso_local signext i32 @caller2(i32 signext %a, i32 signext %b) local_unna
; CHECK-PWR8-NEXT: nop
; CHECK-PWR8-NEXT: addi r1, r1, 176
; CHECK-PWR8-NEXT: ld r0, 16(r1)
-; CHECK-PWR8-NEXT: mtlr r0
; CHECK-PWR8-NEXT: lfd f15, -136(r1) # 8-byte Folded Reload
; CHECK-PWR8-NEXT: lfd f14, -144(r1) # 8-byte Folded Reload
+; CHECK-PWR8-NEXT: mtlr r0
; CHECK-PWR8-NEXT: blr
;
; CHECK-PWR9-LABEL: caller2:
@@ -105,9 +105,9 @@ define dso_local signext i32 @caller2(i32 signext %a, i32 signext %b) local_unna
; CHECK-PWR9-NEXT: nop
; CHECK-PWR9-NEXT: addi r1, r1, 176
; CHECK-PWR9-NEXT: ld r0, 16(r1)
-; CHECK-PWR9-NEXT: mtlr r0
; CHECK-PWR9-NEXT: lfd f15, -136(r1) # 8-byte Folded Reload
; CHECK-PWR9-NEXT: lfd f14, -144(r1) # 8-byte Folded Reload
+; CHECK-PWR9-NEXT: mtlr r0
; CHECK-PWR9-NEXT: blr
entry:
%0 = tail call i32 asm "add $0, $1, $2", "=r,r,r,~{f14},~{f15}"(i32 %a, i32 %b)
OpenPOWER on IntegriCloud