Fix ordering of operands on lowering of atomicrmw min/max nodes on ARM.
[oota-llvm.git] / test / CodeGen / X86 / change-compare-stride-1.ll
index 49b691f4a75bf6a47a661d1081be2523dc5a0186..1c5c113a72324667296d412318d9f6a1b7f2bbe4 100644 (file)
@@ -1,11 +1,21 @@
-; RUN: llvm-as < %s | llc -march=x86-64 > %t
-; RUN: grep {cmpq      \$-478,} %t
-; RUN: not grep inc %t
-; RUN: not grep {leal  1(} %t
-; RUN: not grep {leal  -1(} %t
-; RUN: grep dec %t | count 1
+; RUN: llc < %s -march=x86-64 -enable-lsr-nested | FileCheck %s
+;
+; Nested LSR is required to optimize this case.
+; We do not expect to see this form of IR without -enable-iv-rewrite.
+
+; xfailed for now because the scheduler two-address hack has been disabled.
+; Now it's generating a leal -1 rather than a decq.
+; XFAIL: *
 
 define void @borf(i8* nocapture %in, i8* nocapture %out) nounwind {
+; CHECK: borf:
+; CHECK-NOT: inc
+; CHECK-NOT: leal 1(
+; CHECK-NOT: leal -1(
+; CHECK: decq
+; CHECK-NEXT: cmpq $-478
+; CHECK: ret
+
 bb4.thread:
        br label %bb2.outer