[PATCH] D20456: [CodeGen] Fix problem with X86 byte registers in CriticalAntiDepBreaker

Mitch Bodart via llvm-commits llvm-commits at lists.llvm.org
Thu May 26 15:20:55 PDT 2016


mbodart added inline comments.

================
Comment at: test/CodeGen/X86/pr27681.mir:9-12
@@ +8,6 @@
+  define i32 @main() {
+  entry:
+    ret i32 0
+  }
+
+...
----------------
Tried that, but llc want' to see a label corresponding to bb.0.entry.

================
Comment at: test/CodeGen/X86/pr27681.mir:61-71
@@ +60,13 @@
+    %edx = SAR32rCL killed %edx, implicit-def dead %eflags, implicit %cl
+    TEST32rr killed %edx, %edx, implicit-def %eflags
+    %cl = SETNEr implicit %eflags
+    ; Verify that removal of the %bl antidependence does not use %ch
+    ; as a replacement register.
+    ; CHECK-LABEL: main
+    ; CHECK: %cl = AND8rr %cl, killed %b
+    %cl = AND8rr killed %cl, killed %bl, implicit-def dead %eflags
+    CMP32ri8 %ebp, -1, implicit-def %eflags
+    %edx = MOV32ri 0
+    JE_1 %bb.3, implicit %eflags
+
+  bb.2:
----------------
When I tried removing instructions from bb.0, bb.2 and bb.3, either llc crashed, or the bug did not reproduce.

================
Comment at: test/CodeGen/X86/pr27681.mir:90
@@ +89,2 @@
+
+...
----------------
Just removing instructions from bb.2 caused the failure to not reproduce.
I think, but haven't verified, that having %cl be live out is needed.

I originally had the CHECK-LABEL up near main, but llc chokes on that.


http://reviews.llvm.org/D20456





More information about the llvm-commits mailing list