[llvm] 6b461ba - [VE] Change to use EXTRACT_SUBREG instead of COPY_TO_REGCLASS

Simon Moll via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 4 00:06:28 PDT 2020


Author: Kazushi (Jam) Marukawa
Date: 2020-06-04T09:05:36+02:00
New Revision: 6b461ba4590f531cf3aafca8a1a4bfa896f5e5c8

URL: https://github.com/llvm/llvm-project/commit/6b461ba4590f531cf3aafca8a1a4bfa896f5e5c8
DIFF: https://github.com/llvm/llvm-project/commit/6b461ba4590f531cf3aafca8a1a4bfa896f5e5c8.diff

LOG: [VE] Change to use EXTRACT_SUBREG instead of COPY_TO_REGCLASS

Summary:
Change to use EXTRACT_SUBREG instead of COPY_TO_REGCLASS in order to
remove unnecessary copy instructions.

Differential Revision: https://reviews.llvm.org/D81129

Added: 
    

Modified: 
    llvm/lib/Target/VE/VEInstrInfo.td
    llvm/test/CodeGen/VE/call.ll
    llvm/test/CodeGen/VE/cast.ll
    llvm/test/CodeGen/VE/constants.ll
    llvm/test/CodeGen/VE/fp_add.ll
    llvm/test/CodeGen/VE/fp_div.ll
    llvm/test/CodeGen/VE/fp_mul.ll
    llvm/test/CodeGen/VE/fp_sub.ll
    llvm/test/CodeGen/VE/fp_to_int.ll
    llvm/test/CodeGen/VE/selectccf32i.ll
    llvm/test/CodeGen/VE/setccf32i.ll
    llvm/test/CodeGen/VE/va_caller.ll

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/VE/VEInstrInfo.td b/llvm/lib/Target/VE/VEInstrInfo.td
index 07aec99bac58..2ebd0ec1234e 100644
--- a/llvm/lib/Target/VE/VEInstrInfo.td
+++ b/llvm/lib/Target/VE/VEInstrInfo.td
@@ -1161,7 +1161,7 @@ def : Pat<(i64 imm:$val),
 
 // floating point
 def : Pat<(f32 fpimm:$val),
-          (COPY_TO_REGCLASS (LEASLzii 0, 0, (LOFP32 $val)), F32)>;
+          (EXTRACT_SUBREG (LEASLzii 0, 0, (LOFP32 $val)), sub_f32)>;
 def : Pat<(f64 fplozero:$val),
           (LEASLzii 0, 0, (HIFP32 $val))>;
 def : Pat<(f64 fplomsbzero:$val),

diff  --git a/llvm/test/CodeGen/VE/call.ll b/llvm/test/CodeGen/VE/call.ll
index 51256319d3b5..9e9f22b6d823 100644
--- a/llvm/test/CodeGen/VE/call.ll
+++ b/llvm/test/CodeGen/VE/call.ll
@@ -72,27 +72,27 @@ define float @stack_call_float() {
 ; CHECK:       .LBB{{[0-9]+}}_2:
 ; CHECK-NEXT:    lea %s0, 1092616192
 ; CHECK-NEXT:    stl %s0, 252(, %s11)
-; CHECK-NEXT:    lea %s0, 1091567616
-; CHECK-NEXT:    lea %s1, stack_callee_float at lo
-; CHECK-NEXT:    and %s1, %s1, (32)0
-; CHECK-NEXT:    lea.sl %s12, stack_callee_float at hi(, %s1)
-; CHECK-NEXT:    lea.sl %s1, 1065353216
-; CHECK-NEXT:    lea.sl %s2, 1073741824
-; CHECK-NEXT:    lea.sl %s3, 1077936128
-; CHECK-NEXT:    lea.sl %s4, 1082130432
-; CHECK-NEXT:    lea.sl %s5, 1084227584
-; CHECK-NEXT:    lea.sl %s6, 1086324736
-; CHECK-NEXT:    lea.sl %s7, 1088421888
-; CHECK-NEXT:    lea.sl %s34, 1090519040
-; CHECK-NEXT:    stl %s0, 244(, %s11)
-; CHECK-NEXT:    or %s0, 0, %s1
-; CHECK-NEXT:    or %s1, 0, %s2
-; CHECK-NEXT:    or %s2, 0, %s3
-; CHECK-NEXT:    or %s3, 0, %s4
-; CHECK-NEXT:    or %s4, 0, %s5
-; CHECK-NEXT:    or %s5, 0, %s6
-; CHECK-NEXT:    or %s6, 0, %s7
-; CHECK-NEXT:    or %s7, 0, %s34
+; CHECK-NEXT:    lea %s34, 1091567616
+; CHECK-NEXT:    lea %s0, stack_callee_float at lo
+; CHECK-NEXT:    and %s0, %s0, (32)0
+; CHECK-NEXT:    lea.sl %s12, stack_callee_float at hi(, %s0)
+; CHECK-NEXT:    lea.sl %s0, 1065353216
+; CHECK-NEXT:    lea.sl %s1, 1073741824
+; CHECK-NEXT:    lea.sl %s2, 1077936128
+; CHECK-NEXT:    lea.sl %s3, 1082130432
+; CHECK-NEXT:    lea.sl %s4, 1084227584
+; CHECK-NEXT:    lea.sl %s5, 1086324736
+; CHECK-NEXT:    lea.sl %s6, 1088421888
+; CHECK-NEXT:    lea.sl %s7, 1090519040
+; CHECK-NEXT:    stl %s34, 244(, %s11)
+; CHECK-NEXT:    # kill: def $sf0 killed $sf0 killed $sx0
+; CHECK-NEXT:    # kill: def $sf1 killed $sf1 killed $sx1
+; CHECK-NEXT:    # kill: def $sf2 killed $sf2 killed $sx2
+; CHECK-NEXT:    # kill: def $sf3 killed $sf3 killed $sx3
+; CHECK-NEXT:    # kill: def $sf4 killed $sf4 killed $sx4
+; CHECK-NEXT:    # kill: def $sf5 killed $sf5 killed $sx5
+; CHECK-NEXT:    # kill: def $sf6 killed $sf6 killed $sx6
+; CHECK-NEXT:    # kill: def $sf7 killed $sf7 killed $sx7
 ; CHECK-NEXT:    bsic %s10, (, %s12)
 ; CHECK-NEXT:    or %s11, 0, %s9
   %r = tail call float @stack_callee_float(float 1.0, float 2.0, float 3.0, float 4.0, float 5.0, float 6.0, float 7.0, float 8.0, float 9.0, float 10.0)

diff  --git a/llvm/test/CodeGen/VE/cast.ll b/llvm/test/CodeGen/VE/cast.ll
index fb431fe0ce47..51126e123ac6 100644
--- a/llvm/test/CodeGen/VE/cast.ll
+++ b/llvm/test/CodeGen/VE/cast.ll
@@ -199,7 +199,6 @@ define i64 @f2ull(float %x) {
 ; CHECK-LABEL: f2ull:
 ; CHECK:       .LBB{{[0-9]+}}_2:
 ; CHECK-NEXT:    lea.sl %s1, 1593835520
-; CHECK-NEXT:    or %s1, 0, %s1
 ; CHECK-NEXT:    fcmp.s %s2, %s0, %s1
 ; CHECK-NEXT:    fsub.s %s1, %s0, %s1
 ; CHECK-NEXT:    cvt.d.s %s1, %s1

diff  --git a/llvm/test/CodeGen/VE/constants.ll b/llvm/test/CodeGen/VE/constants.ll
index 366b42f49393..b7a43605ae34 100644
--- a/llvm/test/CodeGen/VE/constants.ll
+++ b/llvm/test/CodeGen/VE/constants.ll
@@ -304,7 +304,7 @@ define float @m5f32() {
 ; CHECK-LABEL: m5f32:
 ; CHECK:       .LBB{{[0-9]+}}_2:
 ; CHECK-NEXT:    lea.sl %s0, -1063256064
-; CHECK-NEXT:    or %s0, 0, %s0
+; CHECK-NEXT:    # kill: def $sf0 killed $sf0 killed $sx0
 ; CHECK-NEXT:    or %s11, 0, %s9
   ret float -5.000000e+00
 }
@@ -321,7 +321,7 @@ define float @p2p3f32() {
 ; CHECK-LABEL: p2p3f32:
 ; CHECK:       .LBB{{[0-9]+}}_2:
 ; CHECK-NEXT:    lea.sl %s0, 1075000115
-; CHECK-NEXT:    or %s0, 0, %s0
+; CHECK-NEXT:    # kill: def $sf0 killed $sf0 killed $sx0
 ; CHECK-NEXT:    or %s11, 0, %s9
   ret float 0x4002666660000000 ; 2.3
 }
@@ -339,7 +339,7 @@ define float @p128p3f32() {
 ; CHECK-LABEL: p128p3f32:
 ; CHECK:       .LBB{{[0-9]+}}_2:
 ; CHECK-NEXT:    lea.sl %s0, 1124093133
-; CHECK-NEXT:    or %s0, 0, %s0
+; CHECK-NEXT:    # kill: def $sf0 killed $sf0 killed $sx0
 ; CHECK-NEXT:    or %s11, 0, %s9
   ret float 0x40600999A0000000 ; 128.3
 }

diff  --git a/llvm/test/CodeGen/VE/fp_add.ll b/llvm/test/CodeGen/VE/fp_add.ll
index 7cc6ea2bfe65..055e68fc1702 100644
--- a/llvm/test/CodeGen/VE/fp_add.ll
+++ b/llvm/test/CodeGen/VE/fp_add.ll
@@ -22,7 +22,6 @@ define float @func4(float %a) {
 ; CHECK-LABEL: func4:
 ; CHECK:       .LBB{{[0-9]+}}_2:
 ; CHECK-NEXT:    lea.sl %s1, 1084227584
-; CHECK-NEXT:    or %s1, 0, %s1
 ; CHECK-NEXT:    fadd.s %s0, %s0, %s1
 ; CHECK-NEXT:    or %s11, 0, %s9
   %r = fadd float %a, 5.000000e+00
@@ -43,7 +42,6 @@ define float @func7(float %a) {
 ; CHECK-LABEL: func7:
 ; CHECK:       .LBB{{[0-9]+}}_2:
 ; CHECK-NEXT:    lea.sl %s1, 2139095039
-; CHECK-NEXT:    or %s1, 0, %s1
 ; CHECK-NEXT:    fadd.s %s0, %s0, %s1
 ; CHECK-NEXT:    or %s11, 0, %s9
   %r = fadd float %a, 0x47EFFFFFE0000000

diff  --git a/llvm/test/CodeGen/VE/fp_div.ll b/llvm/test/CodeGen/VE/fp_div.ll
index 912ffa05a572..9a4ad87f6b59 100644
--- a/llvm/test/CodeGen/VE/fp_div.ll
+++ b/llvm/test/CodeGen/VE/fp_div.ll
@@ -22,7 +22,6 @@ define float @func4(float %a) {
 ; CHECK-LABEL: func4:
 ; CHECK:       .LBB{{[0-9]+}}_2:
 ; CHECK-NEXT:    lea.sl %s1, 1084227584
-; CHECK-NEXT:    or %s1, 0, %s1
 ; CHECK-NEXT:    fdiv.s %s0, %s0, %s1
 ; CHECK-NEXT:    or %s11, 0, %s9
   %r = fdiv float %a, 5.000000e+00
@@ -43,7 +42,6 @@ define float @func7(float %a) {
 ; CHECK-LABEL: func7:
 ; CHECK:       .LBB{{[0-9]+}}_2:
 ; CHECK-NEXT:    lea.sl %s1, 2139095039
-; CHECK-NEXT:    or %s1, 0, %s1
 ; CHECK-NEXT:    fdiv.s %s0, %s0, %s1
 ; CHECK-NEXT:    or %s11, 0, %s9
   %r = fdiv float %a, 0x47EFFFFFE0000000

diff  --git a/llvm/test/CodeGen/VE/fp_mul.ll b/llvm/test/CodeGen/VE/fp_mul.ll
index 4b324980ca69..65aeccdccdff 100644
--- a/llvm/test/CodeGen/VE/fp_mul.ll
+++ b/llvm/test/CodeGen/VE/fp_mul.ll
@@ -22,7 +22,6 @@ define float @func4(float %a) {
 ; CHECK-LABEL: func4:
 ; CHECK:       .LBB{{[0-9]+}}_2:
 ; CHECK-NEXT:    lea.sl %s1, 1084227584
-; CHECK-NEXT:    or %s1, 0, %s1
 ; CHECK-NEXT:    fmul.s %s0, %s0, %s1
 ; CHECK-NEXT:    or %s11, 0, %s9
   %r = fmul float %a, 5.000000e+00
@@ -43,7 +42,6 @@ define float @func7(float %a) {
 ; CHECK-LABEL: func7:
 ; CHECK:       .LBB{{[0-9]+}}_2:
 ; CHECK-NEXT:    lea.sl %s1, 2139095039
-; CHECK-NEXT:    or %s1, 0, %s1
 ; CHECK-NEXT:    fmul.s %s0, %s0, %s1
 ; CHECK-NEXT:    or %s11, 0, %s9
   %r = fmul float %a, 0x47EFFFFFE0000000

diff  --git a/llvm/test/CodeGen/VE/fp_sub.ll b/llvm/test/CodeGen/VE/fp_sub.ll
index 42a3d9bec1b7..e23e821eb77f 100644
--- a/llvm/test/CodeGen/VE/fp_sub.ll
+++ b/llvm/test/CodeGen/VE/fp_sub.ll
@@ -22,7 +22,6 @@ define float @func4(float %a) {
 ; CHECK-LABEL: func4:
 ; CHECK:       .LBB{{[0-9]+}}_2:
 ; CHECK-NEXT:    lea.sl %s1, -1063256064
-; CHECK-NEXT:    or %s1, 0, %s1
 ; CHECK-NEXT:    fadd.s %s0, %s0, %s1
 ; CHECK-NEXT:    or %s11, 0, %s9
   %r = fadd float %a, -5.000000e+00
@@ -43,7 +42,6 @@ define float @func7(float %a) {
 ; CHECK-LABEL: func7:
 ; CHECK:       .LBB{{[0-9]+}}_2:
 ; CHECK-NEXT:    lea.sl %s1, -8388609
-; CHECK-NEXT:    or %s1, 0, %s1
 ; CHECK-NEXT:    fadd.s %s0, %s0, %s1
 ; CHECK-NEXT:    or %s11, 0, %s9
   %r = fadd float %a, 0xC7EFFFFFE0000000

diff  --git a/llvm/test/CodeGen/VE/fp_to_int.ll b/llvm/test/CodeGen/VE/fp_to_int.ll
index 29d3237598a3..9a1a7e35c119 100644
--- a/llvm/test/CodeGen/VE/fp_to_int.ll
+++ b/llvm/test/CodeGen/VE/fp_to_int.ll
@@ -85,7 +85,6 @@ define i64 @f2ul(float %a) {
 ; CHECK-LABEL: f2ul:
 ; CHECK:       .LBB{{[0-9]+}}_2:
 ; CHECK-NEXT:    lea.sl %s1, 1593835520
-; CHECK-NEXT:    or %s1, 0, %s1
 ; CHECK-NEXT:    fcmp.s %s2, %s0, %s1
 ; CHECK-NEXT:    fsub.s %s1, %s0, %s1
 ; CHECK-NEXT:    cvt.d.s %s1, %s1

diff  --git a/llvm/test/CodeGen/VE/selectccf32i.ll b/llvm/test/CodeGen/VE/selectccf32i.ll
index 3725a8c068e1..e8285c818c54 100644
--- a/llvm/test/CodeGen/VE/selectccf32i.ll
+++ b/llvm/test/CodeGen/VE/selectccf32i.ll
@@ -23,10 +23,9 @@ define float @selectccat(float, float, float, float) {
 define float @selectccoeq(float, float, float, float) {
 ; CHECK-LABEL: selectccoeq:
 ; CHECK:       .LBB{{[0-9]+}}_2:
-; CHECK-NEXT:    lea.sl %s1, 0
 ; CHECK-NEXT:    # kill: def $sf3 killed $sf3 def $sx3
 ; CHECK-NEXT:    # kill: def $sf2 killed $sf2 def $sx2
-; CHECK-NEXT:    or %s1, 0, %s1
+; CHECK-NEXT:    lea.sl %s1, 0
 ; CHECK-NEXT:    fcmp.s %s0, %s0, %s1
 ; CHECK-NEXT:    cmov.s.eq %s3, %s2, %s0
 ; CHECK-NEXT:    or %s0, 0, %s3
@@ -39,10 +38,9 @@ define float @selectccoeq(float, float, float, float) {
 define float @selectccone(float, float, float, float) {
 ; CHECK-LABEL: selectccone:
 ; CHECK:       .LBB{{[0-9]+}}_2:
-; CHECK-NEXT:    lea.sl %s1, 0
 ; CHECK-NEXT:    # kill: def $sf3 killed $sf3 def $sx3
 ; CHECK-NEXT:    # kill: def $sf2 killed $sf2 def $sx2
-; CHECK-NEXT:    or %s1, 0, %s1
+; CHECK-NEXT:    lea.sl %s1, 0
 ; CHECK-NEXT:    fcmp.s %s0, %s0, %s1
 ; CHECK-NEXT:    cmov.s.ne %s3, %s2, %s0
 ; CHECK-NEXT:    or %s0, 0, %s3
@@ -55,10 +53,9 @@ define float @selectccone(float, float, float, float) {
 define float @selectccogt(float, float, float, float) {
 ; CHECK-LABEL: selectccogt:
 ; CHECK:       .LBB{{[0-9]+}}_2:
-; CHECK-NEXT:    lea.sl %s1, 0
 ; CHECK-NEXT:    # kill: def $sf3 killed $sf3 def $sx3
 ; CHECK-NEXT:    # kill: def $sf2 killed $sf2 def $sx2
-; CHECK-NEXT:    or %s1, 0, %s1
+; CHECK-NEXT:    lea.sl %s1, 0
 ; CHECK-NEXT:    fcmp.s %s0, %s0, %s1
 ; CHECK-NEXT:    cmov.s.gt %s3, %s2, %s0
 ; CHECK-NEXT:    or %s0, 0, %s3
@@ -71,10 +68,9 @@ define float @selectccogt(float, float, float, float) {
 define float @selectccoge(float, float, float, float) {
 ; CHECK-LABEL: selectccoge:
 ; CHECK:       .LBB{{[0-9]+}}_2:
-; CHECK-NEXT:    lea.sl %s1, 0
 ; CHECK-NEXT:    # kill: def $sf3 killed $sf3 def $sx3
 ; CHECK-NEXT:    # kill: def $sf2 killed $sf2 def $sx2
-; CHECK-NEXT:    or %s1, 0, %s1
+; CHECK-NEXT:    lea.sl %s1, 0
 ; CHECK-NEXT:    fcmp.s %s0, %s0, %s1
 ; CHECK-NEXT:    cmov.s.ge %s3, %s2, %s0
 ; CHECK-NEXT:    or %s0, 0, %s3
@@ -87,10 +83,9 @@ define float @selectccoge(float, float, float, float) {
 define float @selectccolt(float, float, float, float) {
 ; CHECK-LABEL: selectccolt:
 ; CHECK:       .LBB{{[0-9]+}}_2:
-; CHECK-NEXT:    lea.sl %s1, 0
 ; CHECK-NEXT:    # kill: def $sf3 killed $sf3 def $sx3
 ; CHECK-NEXT:    # kill: def $sf2 killed $sf2 def $sx2
-; CHECK-NEXT:    or %s1, 0, %s1
+; CHECK-NEXT:    lea.sl %s1, 0
 ; CHECK-NEXT:    fcmp.s %s0, %s0, %s1
 ; CHECK-NEXT:    cmov.s.lt %s3, %s2, %s0
 ; CHECK-NEXT:    or %s0, 0, %s3
@@ -103,10 +98,9 @@ define float @selectccolt(float, float, float, float) {
 define float @selectccole(float, float, float, float) {
 ; CHECK-LABEL: selectccole:
 ; CHECK:       .LBB{{[0-9]+}}_2:
-; CHECK-NEXT:    lea.sl %s1, 0
 ; CHECK-NEXT:    # kill: def $sf3 killed $sf3 def $sx3
 ; CHECK-NEXT:    # kill: def $sf2 killed $sf2 def $sx2
-; CHECK-NEXT:    or %s1, 0, %s1
+; CHECK-NEXT:    lea.sl %s1, 0
 ; CHECK-NEXT:    fcmp.s %s0, %s0, %s1
 ; CHECK-NEXT:    cmov.s.le %s3, %s2, %s0
 ; CHECK-NEXT:    or %s0, 0, %s3
@@ -147,10 +141,9 @@ define float @selectccuno(float, float, float, float) {
 define float @selectccueq(float, float, float, float) {
 ; CHECK-LABEL: selectccueq:
 ; CHECK:       .LBB{{[0-9]+}}_2:
-; CHECK-NEXT:    lea.sl %s1, 0
 ; CHECK-NEXT:    # kill: def $sf3 killed $sf3 def $sx3
 ; CHECK-NEXT:    # kill: def $sf2 killed $sf2 def $sx2
-; CHECK-NEXT:    or %s1, 0, %s1
+; CHECK-NEXT:    lea.sl %s1, 0
 ; CHECK-NEXT:    fcmp.s %s0, %s0, %s1
 ; CHECK-NEXT:    cmov.s.eqnan %s3, %s2, %s0
 ; CHECK-NEXT:    or %s0, 0, %s3
@@ -163,10 +156,9 @@ define float @selectccueq(float, float, float, float) {
 define float @selectccune(float, float, float, float) {
 ; CHECK-LABEL: selectccune:
 ; CHECK:       .LBB{{[0-9]+}}_2:
-; CHECK-NEXT:    lea.sl %s1, 0
 ; CHECK-NEXT:    # kill: def $sf3 killed $sf3 def $sx3
 ; CHECK-NEXT:    # kill: def $sf2 killed $sf2 def $sx2
-; CHECK-NEXT:    or %s1, 0, %s1
+; CHECK-NEXT:    lea.sl %s1, 0
 ; CHECK-NEXT:    fcmp.s %s0, %s0, %s1
 ; CHECK-NEXT:    cmov.s.nenan %s3, %s2, %s0
 ; CHECK-NEXT:    or %s0, 0, %s3
@@ -179,10 +171,9 @@ define float @selectccune(float, float, float, float) {
 define float @selectccugt(float, float, float, float) {
 ; CHECK-LABEL: selectccugt:
 ; CHECK:       .LBB{{[0-9]+}}_2:
-; CHECK-NEXT:    lea.sl %s1, 0
 ; CHECK-NEXT:    # kill: def $sf3 killed $sf3 def $sx3
 ; CHECK-NEXT:    # kill: def $sf2 killed $sf2 def $sx2
-; CHECK-NEXT:    or %s1, 0, %s1
+; CHECK-NEXT:    lea.sl %s1, 0
 ; CHECK-NEXT:    fcmp.s %s0, %s0, %s1
 ; CHECK-NEXT:    cmov.s.gtnan %s3, %s2, %s0
 ; CHECK-NEXT:    or %s0, 0, %s3
@@ -195,10 +186,9 @@ define float @selectccugt(float, float, float, float) {
 define float @selectccuge(float, float, float, float) {
 ; CHECK-LABEL: selectccuge:
 ; CHECK:       .LBB{{[0-9]+}}_2:
-; CHECK-NEXT:    lea.sl %s1, 0
 ; CHECK-NEXT:    # kill: def $sf3 killed $sf3 def $sx3
 ; CHECK-NEXT:    # kill: def $sf2 killed $sf2 def $sx2
-; CHECK-NEXT:    or %s1, 0, %s1
+; CHECK-NEXT:    lea.sl %s1, 0
 ; CHECK-NEXT:    fcmp.s %s0, %s0, %s1
 ; CHECK-NEXT:    cmov.s.genan %s3, %s2, %s0
 ; CHECK-NEXT:    or %s0, 0, %s3
@@ -211,10 +201,9 @@ define float @selectccuge(float, float, float, float) {
 define float @selectccult(float, float, float, float) {
 ; CHECK-LABEL: selectccult:
 ; CHECK:       .LBB{{[0-9]+}}_2:
-; CHECK-NEXT:    lea.sl %s1, 0
 ; CHECK-NEXT:    # kill: def $sf3 killed $sf3 def $sx3
 ; CHECK-NEXT:    # kill: def $sf2 killed $sf2 def $sx2
-; CHECK-NEXT:    or %s1, 0, %s1
+; CHECK-NEXT:    lea.sl %s1, 0
 ; CHECK-NEXT:    fcmp.s %s0, %s0, %s1
 ; CHECK-NEXT:    cmov.s.ltnan %s3, %s2, %s0
 ; CHECK-NEXT:    or %s0, 0, %s3
@@ -227,10 +216,9 @@ define float @selectccult(float, float, float, float) {
 define float @selectccule(float, float, float, float) {
 ; CHECK-LABEL: selectccule:
 ; CHECK:       .LBB{{[0-9]+}}_2:
-; CHECK-NEXT:    lea.sl %s1, 0
 ; CHECK-NEXT:    # kill: def $sf3 killed $sf3 def $sx3
 ; CHECK-NEXT:    # kill: def $sf2 killed $sf2 def $sx2
-; CHECK-NEXT:    or %s1, 0, %s1
+; CHECK-NEXT:    lea.sl %s1, 0
 ; CHECK-NEXT:    fcmp.s %s0, %s0, %s1
 ; CHECK-NEXT:    cmov.s.lenan %s3, %s2, %s0
 ; CHECK-NEXT:    or %s0, 0, %s3

diff  --git a/llvm/test/CodeGen/VE/setccf32i.ll b/llvm/test/CodeGen/VE/setccf32i.ll
index 44bd6717545a..8f79219359f3 100644
--- a/llvm/test/CodeGen/VE/setccf32i.ll
+++ b/llvm/test/CodeGen/VE/setccf32i.ll
@@ -22,7 +22,6 @@ define zeroext i1 @setccoeq(float, float) {
 ; CHECK-LABEL: setccoeq:
 ; CHECK:       .LBB{{[0-9]+}}_2:
 ; CHECK-NEXT:    lea.sl %s1, 0
-; CHECK-NEXT:    or %s1, 0, %s1
 ; CHECK-NEXT:    fcmp.s %s1, %s0, %s1
 ; CHECK-NEXT:    or %s0, 0, (0)1
 ; CHECK-NEXT:    cmov.s.eq %s0, (63)0, %s1
@@ -36,7 +35,6 @@ define zeroext i1 @setccone(float, float) {
 ; CHECK-LABEL: setccone:
 ; CHECK:       .LBB{{[0-9]+}}_2:
 ; CHECK-NEXT:    lea.sl %s1, 0
-; CHECK-NEXT:    or %s1, 0, %s1
 ; CHECK-NEXT:    fcmp.s %s1, %s0, %s1
 ; CHECK-NEXT:    or %s0, 0, (0)1
 ; CHECK-NEXT:    cmov.s.ne %s0, (63)0, %s1
@@ -50,7 +48,6 @@ define zeroext i1 @setccogt(float, float) {
 ; CHECK-LABEL: setccogt:
 ; CHECK:       .LBB{{[0-9]+}}_2:
 ; CHECK-NEXT:    lea.sl %s1, 0
-; CHECK-NEXT:    or %s1, 0, %s1
 ; CHECK-NEXT:    fcmp.s %s1, %s0, %s1
 ; CHECK-NEXT:    or %s0, 0, (0)1
 ; CHECK-NEXT:    cmov.s.gt %s0, (63)0, %s1
@@ -64,7 +61,6 @@ define zeroext i1 @setccoge(float, float) {
 ; CHECK-LABEL: setccoge:
 ; CHECK:       .LBB{{[0-9]+}}_2:
 ; CHECK-NEXT:    lea.sl %s1, 0
-; CHECK-NEXT:    or %s1, 0, %s1
 ; CHECK-NEXT:    fcmp.s %s1, %s0, %s1
 ; CHECK-NEXT:    or %s0, 0, (0)1
 ; CHECK-NEXT:    cmov.s.ge %s0, (63)0, %s1
@@ -78,7 +74,6 @@ define zeroext i1 @setccolt(float, float) {
 ; CHECK-LABEL: setccolt:
 ; CHECK:       .LBB{{[0-9]+}}_2:
 ; CHECK-NEXT:    lea.sl %s1, 0
-; CHECK-NEXT:    or %s1, 0, %s1
 ; CHECK-NEXT:    fcmp.s %s1, %s0, %s1
 ; CHECK-NEXT:    or %s0, 0, (0)1
 ; CHECK-NEXT:    cmov.s.lt %s0, (63)0, %s1
@@ -92,7 +87,6 @@ define zeroext i1 @setccole(float, float) {
 ; CHECK-LABEL: setccole:
 ; CHECK:       .LBB{{[0-9]+}}_2:
 ; CHECK-NEXT:    lea.sl %s1, 0
-; CHECK-NEXT:    or %s1, 0, %s1
 ; CHECK-NEXT:    fcmp.s %s1, %s0, %s1
 ; CHECK-NEXT:    or %s0, 0, (0)1
 ; CHECK-NEXT:    cmov.s.le %s0, (63)0, %s1
@@ -130,7 +124,6 @@ define zeroext i1 @setccueq(float, float) {
 ; CHECK-LABEL: setccueq:
 ; CHECK:       .LBB{{[0-9]+}}_2:
 ; CHECK-NEXT:    lea.sl %s1, 0
-; CHECK-NEXT:    or %s1, 0, %s1
 ; CHECK-NEXT:    fcmp.s %s1, %s0, %s1
 ; CHECK-NEXT:    or %s0, 0, (0)1
 ; CHECK-NEXT:    cmov.s.eqnan %s0, (63)0, %s1
@@ -144,7 +137,6 @@ define zeroext i1 @setccune(float, float) {
 ; CHECK-LABEL: setccune:
 ; CHECK:       .LBB{{[0-9]+}}_2:
 ; CHECK-NEXT:    lea.sl %s1, 0
-; CHECK-NEXT:    or %s1, 0, %s1
 ; CHECK-NEXT:    fcmp.s %s1, %s0, %s1
 ; CHECK-NEXT:    or %s0, 0, (0)1
 ; CHECK-NEXT:    cmov.s.nenan %s0, (63)0, %s1
@@ -158,7 +150,6 @@ define zeroext i1 @setccugt(float, float) {
 ; CHECK-LABEL: setccugt:
 ; CHECK:       .LBB{{[0-9]+}}_2:
 ; CHECK-NEXT:    lea.sl %s1, 0
-; CHECK-NEXT:    or %s1, 0, %s1
 ; CHECK-NEXT:    fcmp.s %s1, %s0, %s1
 ; CHECK-NEXT:    or %s0, 0, (0)1
 ; CHECK-NEXT:    cmov.s.gtnan %s0, (63)0, %s1
@@ -172,7 +163,6 @@ define zeroext i1 @setccuge(float, float) {
 ; CHECK-LABEL: setccuge:
 ; CHECK:       .LBB{{[0-9]+}}_2:
 ; CHECK-NEXT:    lea.sl %s1, 0
-; CHECK-NEXT:    or %s1, 0, %s1
 ; CHECK-NEXT:    fcmp.s %s1, %s0, %s1
 ; CHECK-NEXT:    or %s0, 0, (0)1
 ; CHECK-NEXT:    cmov.s.genan %s0, (63)0, %s1
@@ -186,7 +176,6 @@ define zeroext i1 @setccult(float, float) {
 ; CHECK-LABEL: setccult:
 ; CHECK:       .LBB{{[0-9]+}}_2:
 ; CHECK-NEXT:    lea.sl %s1, 0
-; CHECK-NEXT:    or %s1, 0, %s1
 ; CHECK-NEXT:    fcmp.s %s1, %s0, %s1
 ; CHECK-NEXT:    or %s0, 0, (0)1
 ; CHECK-NEXT:    cmov.s.ltnan %s0, (63)0, %s1
@@ -200,7 +189,6 @@ define zeroext i1 @setccule(float, float) {
 ; CHECK-LABEL: setccule:
 ; CHECK:       .LBB{{[0-9]+}}_2:
 ; CHECK-NEXT:    lea.sl %s1, 0
-; CHECK-NEXT:    or %s1, 0, %s1
 ; CHECK-NEXT:    fcmp.s %s1, %s0, %s1
 ; CHECK-NEXT:    or %s0, 0, (0)1
 ; CHECK-NEXT:    cmov.s.lenan %s0, (63)0, %s1

diff  --git a/llvm/test/CodeGen/VE/va_caller.ll b/llvm/test/CodeGen/VE/va_caller.ll
index 64473378a0df..345ab80867f1 100644
--- a/llvm/test/CodeGen/VE/va_caller.ll
+++ b/llvm/test/CodeGen/VE/va_caller.ll
@@ -34,10 +34,10 @@ define i32 @caller() {
 ; CHECK-NEXT:    lea %s0, func at lo
 ; CHECK-NEXT:    and %s0, %s0, (32)0
 ; CHECK-NEXT:    lea.sl %s12, func at hi(, %s0)
-; CHECK-NEXT:    lea.sl %s0, 1086324736
+; CHECK-NEXT:    lea.sl %s6, 1086324736
 ; CHECK-NEXT:    stl %s18, 176(, %s11)
-; CHECK-NEXT:    or %s6, 0, %s0
 ; CHECK-NEXT:    or %s0, 0, %s18
+; CHECK-NEXT:    # kill: def $sf6 killed $sf6 killed $sx6
 ; CHECK-NEXT:    bsic %s10, (, %s12)
 ; CHECK-NEXT:    or %s0, 0, %s18
 ; CHECK-NEXT:    ld %s18, 48(, %s9) # 8-byte Folded Reload


        


More information about the llvm-commits mailing list