]> granicus.if.org Git - llvm/commitdiff
[x86] adjust test to show both add/inc options; NFC
authorSanjay Patel <spatel@rotateright.com>
Fri, 1 Feb 2019 00:07:20 +0000 (00:07 +0000)
committerSanjay Patel <spatel@rotateright.com>
Fri, 1 Feb 2019 00:07:20 +0000 (00:07 +0000)
If we're optimizing for size, that overrides the subtarget
feature, so we would always produce 'inc' if we matched
this pattern.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@352821 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGen/X86/slow-incdec.ll

index 6380eb26dbaded29137ca650e3f6fbfc311cd4d2..af4d76f0f59f070f806ca91b17e0ba052ef7b9d7 100644 (file)
@@ -90,7 +90,7 @@ declare void @external_a()
 declare void @external_b()
 declare {i8, i1} @llvm.uadd.with.overflow.i8(i8, i8)
 
-define void @test_tail_call(i32* %ptr) nounwind optsize {
+define void @test_tail_call(i32* %ptr) nounwind {
 ; CHECK-LABEL: test_tail_call:
 ; CHECK:       # %bb.0: # %entry
 ; CHECK-NEXT:    movl {{[0-9]+}}(%esp), %eax
@@ -99,9 +99,11 @@ define void @test_tail_call(i32* %ptr) nounwind optsize {
 ; CHECK-NEXT:    addb $1, a
 ; CHECK-NEXT:    setb d
 ; CHECK-NEXT:    testb %al, %al
-; CHECK-NEXT:    jne external_b # TAILCALL
+; CHECK-NEXT:    jne .LBB5_2
 ; CHECK-NEXT:  # %bb.1: # %then
 ; CHECK-NEXT:    jmp external_a # TAILCALL
+; CHECK-NEXT:  .LBB5_2: # %else
+; CHECK-NEXT:    jmp external_b # TAILCALL
 entry:
   %val = load i32, i32* %ptr
   %add_ov = call {i32, i1} @llvm.uadd.with.overflow.i32(i32 %val, i32 1)