1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py 2; RUN: llc < %s -mtriple=x86_64-unknown-unknown | FileCheck %s 3 4; rdar://11245199 5; PR12545 6 7declare dso_local void @g() 8 9define void @neg_cmp(i32 %x, i32 %y) nounwind { 10; CHECK-LABEL: neg_cmp: 11; CHECK: # %bb.0: 12; CHECK-NEXT: addl %esi, %edi 13; CHECK-NEXT: jne .LBB0_1 14; CHECK-NEXT: # %bb.2: # %if.then 15; CHECK-NEXT: jmp g # TAILCALL 16; CHECK-NEXT: .LBB0_1: # %if.end 17; CHECK-NEXT: retq 18 %sub = sub i32 0, %y 19 %cmp = icmp eq i32 %x, %sub 20 br i1 %cmp, label %if.then, label %if.end 21 22if.then: 23 tail call void @g() nounwind 24 br label %if.end 25 26if.end: 27 ret void 28} 29 30define void @neg_cmp_commuted(i32 %x, i32 %y) nounwind { 31; CHECK-LABEL: neg_cmp_commuted: 32; CHECK: # %bb.0: 33; CHECK-NEXT: addl %esi, %edi 34; CHECK-NEXT: jne .LBB1_1 35; CHECK-NEXT: # %bb.2: # %if.then 36; CHECK-NEXT: jmp g # TAILCALL 37; CHECK-NEXT: .LBB1_1: # %if.end 38; CHECK-NEXT: retq 39 %sub = sub i32 0, %y 40 %cmp = icmp eq i32 %sub, %x 41 br i1 %cmp, label %if.then, label %if.end 42 43if.then: 44 tail call void @g() nounwind 45 br label %if.end 46 47if.end: 48 ret void 49} 50 51