Skip to content

Commit ef9a388

Browse files
committed
[x86] adjust test to show both add/inc options; NFC
If we're optimizing for size, that overrides the subtarget feature, so we would always produce 'inc' if we matched this pattern. llvm-svn: 352821
1 parent da45d68 commit ef9a388

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

llvm/test/CodeGen/X86/slow-incdec.ll

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ declare void @external_a()
9090
declare void @external_b()
9191
declare {i8, i1} @llvm.uadd.with.overflow.i8(i8, i8)
9292

93-
define void @test_tail_call(i32* %ptr) nounwind optsize {
93+
define void @test_tail_call(i32* %ptr) nounwind {
9494
; CHECK-LABEL: test_tail_call:
9595
; CHECK: # %bb.0: # %entry
9696
; CHECK-NEXT: movl {{[0-9]+}}(%esp), %eax
@@ -99,9 +99,11 @@ define void @test_tail_call(i32* %ptr) nounwind optsize {
9999
; CHECK-NEXT: addb $1, a
100100
; CHECK-NEXT: setb d
101101
; CHECK-NEXT: testb %al, %al
102-
; CHECK-NEXT: jne external_b # TAILCALL
102+
; CHECK-NEXT: jne .LBB5_2
103103
; CHECK-NEXT: # %bb.1: # %then
104104
; CHECK-NEXT: jmp external_a # TAILCALL
105+
; CHECK-NEXT: .LBB5_2: # %else
106+
; CHECK-NEXT: jmp external_b # TAILCALL
105107
entry:
106108
%val = load i32, i32* %ptr
107109
%add_ov = call {i32, i1} @llvm.uadd.with.overflow.i32(i32 %val, i32 1)

0 commit comments

Comments
 (0)