[PATCH] D19268: [DAGCombiner] Do not remove the load of stored values when optimizations are disabled

Quentin Colombet via llvm-commits llvm-commits at lists.llvm.org
Tue May 31 16:40:26 PDT 2016


qcolombet added inline comments.

================
Comment at: test/CodeGen/ARM/dag-combine-ldst.ll:8
@@ +7,3 @@
+
+; CHECK_O0:       mov	r0, #0
+; CHECK_O0-NEXT:  str	r0, [sp, #4]
----------------
Instead of hardcoding r0, use [[TMP:r[0-9]+]] then reuse [[TMP]].
That will make the test robust against regalloc changes.

================
Comment at: test/CodeGen/ARM/dag-combine-ldst.ll:10
@@ +9,3 @@
+; CHECK_O0-NEXT:  str	r0, [sp, #4]
+; CHECK_O0-NEXT:  str	r0, [sp]
+; CHECK_O0-NEXT:  ldr	r0, [sp]
----------------
Factor out the first three lines that are common to both patterns and add the check prefix to the command line.

I.e.,
; CHECK_O1:       mov  r0, #0
; CHECK_O1-NEXT:  str  r0, [sp, #4]
; CHECK_O1-NEXT:  str  r0, [sp]
; CHECK_O1-NOT:   ldr  r0, [sp]
; CHECK_O1-NOT:   add  r0, r0, #2
=>
; CHECK:       mov  r0, #0
; CHECK-NEXT:  str  r0, [sp, #4]
; CHECK-NEXT:  str  r0, [sp]

[CHECK specific to O0 under CHECK_O0]

[CHECK specific to O1 under CHECK_O1]

;
RUN: […] —check-prefix=CHECK_O0
=>
RUN: […] —check-prefix=CHECK_O0 —check-prefix=CHECK_O1

================
Comment at: test/CodeGen/SystemZ/swift-return.ll:55
@@ -56,2 +54,3 @@
+; CHECK-O0: la %r2, 168(%r15)
 ; CHECK-O0: brasl %r14, gen2
 ; CHECK-O0-DAG: l %r{{.*}}, 184(%r15)
----------------
Could you have someone of the SystemZ backend to check.


Repository:
  rL LLVM

http://reviews.llvm.org/D19268





More information about the llvm-commits mailing list