1993 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc < %s -mtriple=i686-- -no-integrated-as | FileCheck %s -check-prefix=X323; RUN: llc < %s -mtriple=x86_64-- -no-integrated-as | FileCheck %s -check-prefix=X644 5define i32 @test_cca(i64 %nr, ptr %addr) nounwind {6; X32-LABEL: test_cca:7; X32: # %bb.0: # %entry8; X32-NEXT: pushl %esi9; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx10; X32-NEXT: movl {{[0-9]+}}(%esp), %edx11; X32-NEXT: movl {{[0-9]+}}(%esp), %esi12; X32-NEXT: xorl %eax, %eax13; X32-NEXT: #APP14; X32-NEXT: cmp %ecx,(%esi)15; X32-NEXT: #NO_APP16; X32-NEXT: seta %al17; X32-NEXT: popl %esi18; X32-NEXT: retl19;20; X64-LABEL: test_cca:21; X64: # %bb.0: # %entry22; X64-NEXT: xorl %eax, %eax23; X64-NEXT: #APP24; X64-NEXT: cmp %rdi,(%rsi)25; X64-NEXT: #NO_APP26; X64-NEXT: seta %al27; X64-NEXT: retq28entry:29 %cc = tail call i32 asm "cmp $2,$1", "={@cca},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i64) %addr, i64 %nr) nounwind30 %tobool = icmp ne i32 %cc, 031 %rv = zext i1 %tobool to i3232 ret i32 %rv33}34 35 36define i32 @test_ccae(i64 %nr, ptr %addr) nounwind {37; X32-LABEL: test_ccae:38; X32: # %bb.0: # %entry39; X32-NEXT: pushl %esi40; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx41; X32-NEXT: movl {{[0-9]+}}(%esp), %edx42; X32-NEXT: movl {{[0-9]+}}(%esp), %esi43; X32-NEXT: xorl %eax, %eax44; X32-NEXT: #APP45; X32-NEXT: cmp %ecx,(%esi)46; X32-NEXT: #NO_APP47; X32-NEXT: setae %al48; X32-NEXT: popl %esi49; X32-NEXT: retl50;51; X64-LABEL: test_ccae:52; X64: # %bb.0: # %entry53; X64-NEXT: xorl %eax, %eax54; X64-NEXT: #APP55; X64-NEXT: cmp %rdi,(%rsi)56; X64-NEXT: #NO_APP57; X64-NEXT: setae %al58; X64-NEXT: retq59entry:60 %cc = tail call i32 asm "cmp $2,$1", "={@ccae},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i64) %addr, i64 %nr) nounwind61 %tobool = icmp ne i32 %cc, 062 %rv = zext i1 %tobool to i3263 ret i32 %rv64}65 66 67define i32 @test_ccb(i64 %nr, ptr %addr) nounwind {68; X32-LABEL: test_ccb:69; X32: # %bb.0: # %entry70; X32-NEXT: pushl %esi71; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx72; X32-NEXT: movl {{[0-9]+}}(%esp), %edx73; X32-NEXT: movl {{[0-9]+}}(%esp), %esi74; X32-NEXT: xorl %eax, %eax75; X32-NEXT: #APP76; X32-NEXT: cmp %ecx,(%esi)77; X32-NEXT: #NO_APP78; X32-NEXT: setb %al79; X32-NEXT: popl %esi80; X32-NEXT: retl81;82; X64-LABEL: test_ccb:83; X64: # %bb.0: # %entry84; X64-NEXT: xorl %eax, %eax85; X64-NEXT: #APP86; X64-NEXT: cmp %rdi,(%rsi)87; X64-NEXT: #NO_APP88; X64-NEXT: setb %al89; X64-NEXT: retq90entry:91 %cc = tail call i32 asm "cmp $2,$1", "={@ccb},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i64) %addr, i64 %nr) nounwind92 %tobool = icmp ne i32 %cc, 093 %rv = zext i1 %tobool to i3294 ret i32 %rv95}96 97 98define i32 @test_ccbe(i64 %nr, ptr %addr) nounwind {99; X32-LABEL: test_ccbe:100; X32: # %bb.0: # %entry101; X32-NEXT: pushl %esi102; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx103; X32-NEXT: movl {{[0-9]+}}(%esp), %edx104; X32-NEXT: movl {{[0-9]+}}(%esp), %esi105; X32-NEXT: xorl %eax, %eax106; X32-NEXT: #APP107; X32-NEXT: cmp %ecx,(%esi)108; X32-NEXT: #NO_APP109; X32-NEXT: setbe %al110; X32-NEXT: popl %esi111; X32-NEXT: retl112;113; X64-LABEL: test_ccbe:114; X64: # %bb.0: # %entry115; X64-NEXT: xorl %eax, %eax116; X64-NEXT: #APP117; X64-NEXT: cmp %rdi,(%rsi)118; X64-NEXT: #NO_APP119; X64-NEXT: setbe %al120; X64-NEXT: retq121entry:122 %cc = tail call i32 asm "cmp $2,$1", "={@ccbe},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i64) %addr, i64 %nr) nounwind123 %tobool = icmp ne i32 %cc, 0124 %rv = zext i1 %tobool to i32125 ret i32 %rv126}127 128 129define i32 @test_ccc(i64 %nr, ptr %addr) nounwind {130; X32-LABEL: test_ccc:131; X32: # %bb.0: # %entry132; X32-NEXT: pushl %esi133; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx134; X32-NEXT: movl {{[0-9]+}}(%esp), %edx135; X32-NEXT: movl {{[0-9]+}}(%esp), %esi136; X32-NEXT: xorl %eax, %eax137; X32-NEXT: #APP138; X32-NEXT: cmp %ecx,(%esi)139; X32-NEXT: #NO_APP140; X32-NEXT: setb %al141; X32-NEXT: popl %esi142; X32-NEXT: retl143;144; X64-LABEL: test_ccc:145; X64: # %bb.0: # %entry146; X64-NEXT: xorl %eax, %eax147; X64-NEXT: #APP148; X64-NEXT: cmp %rdi,(%rsi)149; X64-NEXT: #NO_APP150; X64-NEXT: setb %al151; X64-NEXT: retq152entry:153 %cc = tail call i32 asm "cmp $2,$1", "={@ccc},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i64) %addr, i64 %nr) nounwind154 %tobool = icmp ne i32 %cc, 0155 %rv = zext i1 %tobool to i32156 ret i32 %rv157}158 159 160define i32 @test_cce(i64 %nr, ptr %addr) nounwind {161; X32-LABEL: test_cce:162; X32: # %bb.0: # %entry163; X32-NEXT: pushl %esi164; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx165; X32-NEXT: movl {{[0-9]+}}(%esp), %edx166; X32-NEXT: movl {{[0-9]+}}(%esp), %esi167; X32-NEXT: xorl %eax, %eax168; X32-NEXT: #APP169; X32-NEXT: cmp %ecx,(%esi)170; X32-NEXT: #NO_APP171; X32-NEXT: sete %al172; X32-NEXT: popl %esi173; X32-NEXT: retl174;175; X64-LABEL: test_cce:176; X64: # %bb.0: # %entry177; X64-NEXT: xorl %eax, %eax178; X64-NEXT: #APP179; X64-NEXT: cmp %rdi,(%rsi)180; X64-NEXT: #NO_APP181; X64-NEXT: sete %al182; X64-NEXT: retq183entry:184 %cc = tail call i32 asm "cmp $2,$1", "={@cce},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i64) %addr, i64 %nr) nounwind185 %tobool = icmp ne i32 %cc, 0186 %rv = zext i1 %tobool to i32187 ret i32 %rv188}189 190 191define i32 @test_ccz(i64 %nr, ptr %addr) nounwind {192; X32-LABEL: test_ccz:193; X32: # %bb.0: # %entry194; X32-NEXT: pushl %esi195; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx196; X32-NEXT: movl {{[0-9]+}}(%esp), %edx197; X32-NEXT: movl {{[0-9]+}}(%esp), %esi198; X32-NEXT: xorl %eax, %eax199; X32-NEXT: #APP200; X32-NEXT: cmp %ecx,(%esi)201; X32-NEXT: #NO_APP202; X32-NEXT: sete %al203; X32-NEXT: popl %esi204; X32-NEXT: retl205;206; X64-LABEL: test_ccz:207; X64: # %bb.0: # %entry208; X64-NEXT: xorl %eax, %eax209; X64-NEXT: #APP210; X64-NEXT: cmp %rdi,(%rsi)211; X64-NEXT: #NO_APP212; X64-NEXT: sete %al213; X64-NEXT: retq214entry:215 %cc = tail call i32 asm "cmp $2,$1", "={@ccz},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i64) %addr, i64 %nr) nounwind216 %tobool = icmp ne i32 %cc, 0217 %rv = zext i1 %tobool to i32218 ret i32 %rv219}220 221 222define i32 @test_ccg(i64 %nr, ptr %addr) nounwind {223; X32-LABEL: test_ccg:224; X32: # %bb.0: # %entry225; X32-NEXT: pushl %esi226; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx227; X32-NEXT: movl {{[0-9]+}}(%esp), %edx228; X32-NEXT: movl {{[0-9]+}}(%esp), %esi229; X32-NEXT: xorl %eax, %eax230; X32-NEXT: #APP231; X32-NEXT: cmp %ecx,(%esi)232; X32-NEXT: #NO_APP233; X32-NEXT: setg %al234; X32-NEXT: popl %esi235; X32-NEXT: retl236;237; X64-LABEL: test_ccg:238; X64: # %bb.0: # %entry239; X64-NEXT: xorl %eax, %eax240; X64-NEXT: #APP241; X64-NEXT: cmp %rdi,(%rsi)242; X64-NEXT: #NO_APP243; X64-NEXT: setg %al244; X64-NEXT: retq245entry:246 %cc = tail call i32 asm "cmp $2,$1", "={@ccg},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i64) %addr, i64 %nr) nounwind247 %tobool = icmp ne i32 %cc, 0248 %rv = zext i1 %tobool to i32249 ret i32 %rv250}251 252 253define i32 @test_ccge(i64 %nr, ptr %addr) nounwind {254; X32-LABEL: test_ccge:255; X32: # %bb.0: # %entry256; X32-NEXT: pushl %esi257; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx258; X32-NEXT: movl {{[0-9]+}}(%esp), %edx259; X32-NEXT: movl {{[0-9]+}}(%esp), %esi260; X32-NEXT: xorl %eax, %eax261; X32-NEXT: #APP262; X32-NEXT: cmp %ecx,(%esi)263; X32-NEXT: #NO_APP264; X32-NEXT: setge %al265; X32-NEXT: popl %esi266; X32-NEXT: retl267;268; X64-LABEL: test_ccge:269; X64: # %bb.0: # %entry270; X64-NEXT: xorl %eax, %eax271; X64-NEXT: #APP272; X64-NEXT: cmp %rdi,(%rsi)273; X64-NEXT: #NO_APP274; X64-NEXT: setge %al275; X64-NEXT: retq276entry:277 %cc = tail call i32 asm "cmp $2,$1", "={@ccge},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i64) %addr, i64 %nr) nounwind278 %tobool = icmp ne i32 %cc, 0279 %rv = zext i1 %tobool to i32280 ret i32 %rv281}282 283 284define i32 @test_ccl(i64 %nr, ptr %addr) nounwind {285; X32-LABEL: test_ccl:286; X32: # %bb.0: # %entry287; X32-NEXT: pushl %esi288; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx289; X32-NEXT: movl {{[0-9]+}}(%esp), %edx290; X32-NEXT: movl {{[0-9]+}}(%esp), %esi291; X32-NEXT: xorl %eax, %eax292; X32-NEXT: #APP293; X32-NEXT: cmp %ecx,(%esi)294; X32-NEXT: #NO_APP295; X32-NEXT: setl %al296; X32-NEXT: popl %esi297; X32-NEXT: retl298;299; X64-LABEL: test_ccl:300; X64: # %bb.0: # %entry301; X64-NEXT: xorl %eax, %eax302; X64-NEXT: #APP303; X64-NEXT: cmp %rdi,(%rsi)304; X64-NEXT: #NO_APP305; X64-NEXT: setl %al306; X64-NEXT: retq307entry:308 %cc = tail call i32 asm "cmp $2,$1", "={@ccl},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i64) %addr, i64 %nr) nounwind309 %tobool = icmp ne i32 %cc, 0310 %rv = zext i1 %tobool to i32311 ret i32 %rv312}313 314 315define i32 @test_ccle(i64 %nr, ptr %addr) nounwind {316; X32-LABEL: test_ccle:317; X32: # %bb.0: # %entry318; X32-NEXT: pushl %esi319; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx320; X32-NEXT: movl {{[0-9]+}}(%esp), %edx321; X32-NEXT: movl {{[0-9]+}}(%esp), %esi322; X32-NEXT: xorl %eax, %eax323; X32-NEXT: #APP324; X32-NEXT: cmp %ecx,(%esi)325; X32-NEXT: #NO_APP326; X32-NEXT: setle %al327; X32-NEXT: popl %esi328; X32-NEXT: retl329;330; X64-LABEL: test_ccle:331; X64: # %bb.0: # %entry332; X64-NEXT: xorl %eax, %eax333; X64-NEXT: #APP334; X64-NEXT: cmp %rdi,(%rsi)335; X64-NEXT: #NO_APP336; X64-NEXT: setle %al337; X64-NEXT: retq338entry:339 %cc = tail call i32 asm "cmp $2,$1", "={@ccle},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i64) %addr, i64 %nr) nounwind340 %tobool = icmp ne i32 %cc, 0341 %rv = zext i1 %tobool to i32342 ret i32 %rv343}344 345 346define i32 @test_ccna(i64 %nr, ptr %addr) nounwind {347; X32-LABEL: test_ccna:348; X32: # %bb.0: # %entry349; X32-NEXT: pushl %esi350; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx351; X32-NEXT: movl {{[0-9]+}}(%esp), %edx352; X32-NEXT: movl {{[0-9]+}}(%esp), %esi353; X32-NEXT: xorl %eax, %eax354; X32-NEXT: #APP355; X32-NEXT: cmp %ecx,(%esi)356; X32-NEXT: #NO_APP357; X32-NEXT: setbe %al358; X32-NEXT: popl %esi359; X32-NEXT: retl360;361; X64-LABEL: test_ccna:362; X64: # %bb.0: # %entry363; X64-NEXT: xorl %eax, %eax364; X64-NEXT: #APP365; X64-NEXT: cmp %rdi,(%rsi)366; X64-NEXT: #NO_APP367; X64-NEXT: setbe %al368; X64-NEXT: retq369entry:370 %cc = tail call i32 asm "cmp $2,$1", "={@ccna},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i64) %addr, i64 %nr) nounwind371 %tobool = icmp ne i32 %cc, 0372 %rv = zext i1 %tobool to i32373 ret i32 %rv374}375 376 377define i32 @test_ccnae(i64 %nr, ptr %addr) nounwind {378; X32-LABEL: test_ccnae:379; X32: # %bb.0: # %entry380; X32-NEXT: pushl %esi381; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx382; X32-NEXT: movl {{[0-9]+}}(%esp), %edx383; X32-NEXT: movl {{[0-9]+}}(%esp), %esi384; X32-NEXT: xorl %eax, %eax385; X32-NEXT: #APP386; X32-NEXT: cmp %ecx,(%esi)387; X32-NEXT: #NO_APP388; X32-NEXT: setb %al389; X32-NEXT: popl %esi390; X32-NEXT: retl391;392; X64-LABEL: test_ccnae:393; X64: # %bb.0: # %entry394; X64-NEXT: xorl %eax, %eax395; X64-NEXT: #APP396; X64-NEXT: cmp %rdi,(%rsi)397; X64-NEXT: #NO_APP398; X64-NEXT: setb %al399; X64-NEXT: retq400entry:401 %cc = tail call i32 asm "cmp $2,$1", "={@ccnae},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i64) %addr, i64 %nr) nounwind402 %tobool = icmp ne i32 %cc, 0403 %rv = zext i1 %tobool to i32404 ret i32 %rv405}406 407 408define i32 @test_ccnb(i64 %nr, ptr %addr) nounwind {409; X32-LABEL: test_ccnb:410; X32: # %bb.0: # %entry411; X32-NEXT: pushl %esi412; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx413; X32-NEXT: movl {{[0-9]+}}(%esp), %edx414; X32-NEXT: movl {{[0-9]+}}(%esp), %esi415; X32-NEXT: xorl %eax, %eax416; X32-NEXT: #APP417; X32-NEXT: cmp %ecx,(%esi)418; X32-NEXT: #NO_APP419; X32-NEXT: setae %al420; X32-NEXT: popl %esi421; X32-NEXT: retl422;423; X64-LABEL: test_ccnb:424; X64: # %bb.0: # %entry425; X64-NEXT: xorl %eax, %eax426; X64-NEXT: #APP427; X64-NEXT: cmp %rdi,(%rsi)428; X64-NEXT: #NO_APP429; X64-NEXT: setae %al430; X64-NEXT: retq431entry:432 %cc = tail call i32 asm "cmp $2,$1", "={@ccnb},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i64) %addr, i64 %nr) nounwind433 %tobool = icmp ne i32 %cc, 0434 %rv = zext i1 %tobool to i32435 ret i32 %rv436}437 438 439define i32 @test_ccnbe(i64 %nr, ptr %addr) nounwind {440; X32-LABEL: test_ccnbe:441; X32: # %bb.0: # %entry442; X32-NEXT: pushl %esi443; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx444; X32-NEXT: movl {{[0-9]+}}(%esp), %edx445; X32-NEXT: movl {{[0-9]+}}(%esp), %esi446; X32-NEXT: xorl %eax, %eax447; X32-NEXT: #APP448; X32-NEXT: cmp %ecx,(%esi)449; X32-NEXT: #NO_APP450; X32-NEXT: seta %al451; X32-NEXT: popl %esi452; X32-NEXT: retl453;454; X64-LABEL: test_ccnbe:455; X64: # %bb.0: # %entry456; X64-NEXT: xorl %eax, %eax457; X64-NEXT: #APP458; X64-NEXT: cmp %rdi,(%rsi)459; X64-NEXT: #NO_APP460; X64-NEXT: seta %al461; X64-NEXT: retq462entry:463 %cc = tail call i32 asm "cmp $2,$1", "={@ccnbe},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i64) %addr, i64 %nr) nounwind464 %tobool = icmp ne i32 %cc, 0465 %rv = zext i1 %tobool to i32466 ret i32 %rv467}468 469 470define i32 @test_ccnc(i64 %nr, ptr %addr) nounwind {471; X32-LABEL: test_ccnc:472; X32: # %bb.0: # %entry473; X32-NEXT: pushl %esi474; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx475; X32-NEXT: movl {{[0-9]+}}(%esp), %edx476; X32-NEXT: movl {{[0-9]+}}(%esp), %esi477; X32-NEXT: xorl %eax, %eax478; X32-NEXT: #APP479; X32-NEXT: cmp %ecx,(%esi)480; X32-NEXT: #NO_APP481; X32-NEXT: setae %al482; X32-NEXT: popl %esi483; X32-NEXT: retl484;485; X64-LABEL: test_ccnc:486; X64: # %bb.0: # %entry487; X64-NEXT: xorl %eax, %eax488; X64-NEXT: #APP489; X64-NEXT: cmp %rdi,(%rsi)490; X64-NEXT: #NO_APP491; X64-NEXT: setae %al492; X64-NEXT: retq493entry:494 %cc = tail call i32 asm "cmp $2,$1", "={@ccnc},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i64) %addr, i64 %nr) nounwind495 %tobool = icmp ne i32 %cc, 0496 %rv = zext i1 %tobool to i32497 ret i32 %rv498}499 500 501define i32 @test_ccne(i64 %nr, ptr %addr) nounwind {502; X32-LABEL: test_ccne:503; X32: # %bb.0: # %entry504; X32-NEXT: pushl %esi505; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx506; X32-NEXT: movl {{[0-9]+}}(%esp), %edx507; X32-NEXT: movl {{[0-9]+}}(%esp), %esi508; X32-NEXT: xorl %eax, %eax509; X32-NEXT: #APP510; X32-NEXT: cmp %ecx,(%esi)511; X32-NEXT: #NO_APP512; X32-NEXT: setne %al513; X32-NEXT: popl %esi514; X32-NEXT: retl515;516; X64-LABEL: test_ccne:517; X64: # %bb.0: # %entry518; X64-NEXT: xorl %eax, %eax519; X64-NEXT: #APP520; X64-NEXT: cmp %rdi,(%rsi)521; X64-NEXT: #NO_APP522; X64-NEXT: setne %al523; X64-NEXT: retq524entry:525 %cc = tail call i32 asm "cmp $2,$1", "={@ccne},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i64) %addr, i64 %nr) nounwind526 %tobool = icmp ne i32 %cc, 0527 %rv = zext i1 %tobool to i32528 ret i32 %rv529}530 531 532define i32 @test_ccnz(i64 %nr, ptr %addr) nounwind {533; X32-LABEL: test_ccnz:534; X32: # %bb.0: # %entry535; X32-NEXT: pushl %esi536; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx537; X32-NEXT: movl {{[0-9]+}}(%esp), %edx538; X32-NEXT: movl {{[0-9]+}}(%esp), %esi539; X32-NEXT: xorl %eax, %eax540; X32-NEXT: #APP541; X32-NEXT: cmp %ecx,(%esi)542; X32-NEXT: #NO_APP543; X32-NEXT: setne %al544; X32-NEXT: popl %esi545; X32-NEXT: retl546;547; X64-LABEL: test_ccnz:548; X64: # %bb.0: # %entry549; X64-NEXT: xorl %eax, %eax550; X64-NEXT: #APP551; X64-NEXT: cmp %rdi,(%rsi)552; X64-NEXT: #NO_APP553; X64-NEXT: setne %al554; X64-NEXT: retq555entry:556 %cc = tail call i32 asm "cmp $2,$1", "={@ccnz},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i64) %addr, i64 %nr) nounwind557 %tobool = icmp ne i32 %cc, 0558 %rv = zext i1 %tobool to i32559 ret i32 %rv560}561 562 563define i32 @test_ccng(i64 %nr, ptr %addr) nounwind {564; X32-LABEL: test_ccng:565; X32: # %bb.0: # %entry566; X32-NEXT: pushl %esi567; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx568; X32-NEXT: movl {{[0-9]+}}(%esp), %edx569; X32-NEXT: movl {{[0-9]+}}(%esp), %esi570; X32-NEXT: xorl %eax, %eax571; X32-NEXT: #APP572; X32-NEXT: cmp %ecx,(%esi)573; X32-NEXT: #NO_APP574; X32-NEXT: setle %al575; X32-NEXT: popl %esi576; X32-NEXT: retl577;578; X64-LABEL: test_ccng:579; X64: # %bb.0: # %entry580; X64-NEXT: xorl %eax, %eax581; X64-NEXT: #APP582; X64-NEXT: cmp %rdi,(%rsi)583; X64-NEXT: #NO_APP584; X64-NEXT: setle %al585; X64-NEXT: retq586entry:587 %cc = tail call i32 asm "cmp $2,$1", "={@ccng},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i64) %addr, i64 %nr) nounwind588 %tobool = icmp ne i32 %cc, 0589 %rv = zext i1 %tobool to i32590 ret i32 %rv591}592 593 594define i32 @test_ccnge(i64 %nr, ptr %addr) nounwind {595; X32-LABEL: test_ccnge:596; X32: # %bb.0: # %entry597; X32-NEXT: pushl %esi598; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx599; X32-NEXT: movl {{[0-9]+}}(%esp), %edx600; X32-NEXT: movl {{[0-9]+}}(%esp), %esi601; X32-NEXT: xorl %eax, %eax602; X32-NEXT: #APP603; X32-NEXT: cmp %ecx,(%esi)604; X32-NEXT: #NO_APP605; X32-NEXT: setl %al606; X32-NEXT: popl %esi607; X32-NEXT: retl608;609; X64-LABEL: test_ccnge:610; X64: # %bb.0: # %entry611; X64-NEXT: xorl %eax, %eax612; X64-NEXT: #APP613; X64-NEXT: cmp %rdi,(%rsi)614; X64-NEXT: #NO_APP615; X64-NEXT: setl %al616; X64-NEXT: retq617entry:618 %cc = tail call i32 asm "cmp $2,$1", "={@ccnge},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i64) %addr, i64 %nr) nounwind619 %tobool = icmp ne i32 %cc, 0620 %rv = zext i1 %tobool to i32621 ret i32 %rv622}623 624 625define i32 @test_ccnl(i64 %nr, ptr %addr) nounwind {626; X32-LABEL: test_ccnl:627; X32: # %bb.0: # %entry628; X32-NEXT: pushl %esi629; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx630; X32-NEXT: movl {{[0-9]+}}(%esp), %edx631; X32-NEXT: movl {{[0-9]+}}(%esp), %esi632; X32-NEXT: xorl %eax, %eax633; X32-NEXT: #APP634; X32-NEXT: cmp %ecx,(%esi)635; X32-NEXT: #NO_APP636; X32-NEXT: setge %al637; X32-NEXT: popl %esi638; X32-NEXT: retl639;640; X64-LABEL: test_ccnl:641; X64: # %bb.0: # %entry642; X64-NEXT: xorl %eax, %eax643; X64-NEXT: #APP644; X64-NEXT: cmp %rdi,(%rsi)645; X64-NEXT: #NO_APP646; X64-NEXT: setge %al647; X64-NEXT: retq648entry:649 %cc = tail call i32 asm "cmp $2,$1", "={@ccnl},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i64) %addr, i64 %nr) nounwind650 %tobool = icmp ne i32 %cc, 0651 %rv = zext i1 %tobool to i32652 ret i32 %rv653}654 655 656define i32 @test_ccnle(i64 %nr, ptr %addr) nounwind {657; X32-LABEL: test_ccnle:658; X32: # %bb.0: # %entry659; X32-NEXT: pushl %esi660; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx661; X32-NEXT: movl {{[0-9]+}}(%esp), %edx662; X32-NEXT: movl {{[0-9]+}}(%esp), %esi663; X32-NEXT: xorl %eax, %eax664; X32-NEXT: #APP665; X32-NEXT: cmp %ecx,(%esi)666; X32-NEXT: #NO_APP667; X32-NEXT: setg %al668; X32-NEXT: popl %esi669; X32-NEXT: retl670;671; X64-LABEL: test_ccnle:672; X64: # %bb.0: # %entry673; X64-NEXT: xorl %eax, %eax674; X64-NEXT: #APP675; X64-NEXT: cmp %rdi,(%rsi)676; X64-NEXT: #NO_APP677; X64-NEXT: setg %al678; X64-NEXT: retq679entry:680 %cc = tail call i32 asm "cmp $2,$1", "={@ccnle},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i64) %addr, i64 %nr) nounwind681 %tobool = icmp ne i32 %cc, 0682 %rv = zext i1 %tobool to i32683 ret i32 %rv684}685 686 687define i32 @test_ccno(i64 %nr, ptr %addr) nounwind {688; X32-LABEL: test_ccno:689; X32: # %bb.0: # %entry690; X32-NEXT: pushl %esi691; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx692; X32-NEXT: movl {{[0-9]+}}(%esp), %edx693; X32-NEXT: movl {{[0-9]+}}(%esp), %esi694; X32-NEXT: xorl %eax, %eax695; X32-NEXT: #APP696; X32-NEXT: cmp %ecx,(%esi)697; X32-NEXT: #NO_APP698; X32-NEXT: setno %al699; X32-NEXT: popl %esi700; X32-NEXT: retl701;702; X64-LABEL: test_ccno:703; X64: # %bb.0: # %entry704; X64-NEXT: xorl %eax, %eax705; X64-NEXT: #APP706; X64-NEXT: cmp %rdi,(%rsi)707; X64-NEXT: #NO_APP708; X64-NEXT: setno %al709; X64-NEXT: retq710entry:711 %cc = tail call i32 asm "cmp $2,$1", "={@ccno},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i64) %addr, i64 %nr) nounwind712 %tobool = icmp ne i32 %cc, 0713 %rv = zext i1 %tobool to i32714 ret i32 %rv715}716 717 718define i32 @test_ccnp(i64 %nr, ptr %addr) nounwind {719; X32-LABEL: test_ccnp:720; X32: # %bb.0: # %entry721; X32-NEXT: pushl %esi722; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx723; X32-NEXT: movl {{[0-9]+}}(%esp), %edx724; X32-NEXT: movl {{[0-9]+}}(%esp), %esi725; X32-NEXT: xorl %eax, %eax726; X32-NEXT: #APP727; X32-NEXT: cmp %ecx,(%esi)728; X32-NEXT: #NO_APP729; X32-NEXT: setnp %al730; X32-NEXT: popl %esi731; X32-NEXT: retl732;733; X64-LABEL: test_ccnp:734; X64: # %bb.0: # %entry735; X64-NEXT: xorl %eax, %eax736; X64-NEXT: #APP737; X64-NEXT: cmp %rdi,(%rsi)738; X64-NEXT: #NO_APP739; X64-NEXT: setnp %al740; X64-NEXT: retq741entry:742 %cc = tail call i32 asm "cmp $2,$1", "={@ccnp},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i64) %addr, i64 %nr) nounwind743 %tobool = icmp ne i32 %cc, 0744 %rv = zext i1 %tobool to i32745 ret i32 %rv746}747 748 749define i32 @test_ccns(i64 %nr, ptr %addr) nounwind {750; X32-LABEL: test_ccns:751; X32: # %bb.0: # %entry752; X32-NEXT: pushl %esi753; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx754; X32-NEXT: movl {{[0-9]+}}(%esp), %edx755; X32-NEXT: movl {{[0-9]+}}(%esp), %esi756; X32-NEXT: xorl %eax, %eax757; X32-NEXT: #APP758; X32-NEXT: cmp %ecx,(%esi)759; X32-NEXT: #NO_APP760; X32-NEXT: setns %al761; X32-NEXT: popl %esi762; X32-NEXT: retl763;764; X64-LABEL: test_ccns:765; X64: # %bb.0: # %entry766; X64-NEXT: xorl %eax, %eax767; X64-NEXT: #APP768; X64-NEXT: cmp %rdi,(%rsi)769; X64-NEXT: #NO_APP770; X64-NEXT: setns %al771; X64-NEXT: retq772entry:773 %cc = tail call i32 asm "cmp $2,$1", "={@ccns},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i64) %addr, i64 %nr) nounwind774 %tobool = icmp ne i32 %cc, 0775 %rv = zext i1 %tobool to i32776 ret i32 %rv777}778 779 780define i32 @test_cco(i64 %nr, ptr %addr) nounwind {781; X32-LABEL: test_cco:782; X32: # %bb.0: # %entry783; X32-NEXT: pushl %esi784; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx785; X32-NEXT: movl {{[0-9]+}}(%esp), %edx786; X32-NEXT: movl {{[0-9]+}}(%esp), %esi787; X32-NEXT: xorl %eax, %eax788; X32-NEXT: #APP789; X32-NEXT: cmp %ecx,(%esi)790; X32-NEXT: #NO_APP791; X32-NEXT: seto %al792; X32-NEXT: popl %esi793; X32-NEXT: retl794;795; X64-LABEL: test_cco:796; X64: # %bb.0: # %entry797; X64-NEXT: xorl %eax, %eax798; X64-NEXT: #APP799; X64-NEXT: cmp %rdi,(%rsi)800; X64-NEXT: #NO_APP801; X64-NEXT: seto %al802; X64-NEXT: retq803entry:804 %cc = tail call i32 asm "cmp $2,$1", "={@cco},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i64) %addr, i64 %nr) nounwind805 %tobool = icmp ne i32 %cc, 0806 %rv = zext i1 %tobool to i32807 ret i32 %rv808}809 810 811define i32 @test_ccp(i64 %nr, ptr %addr) nounwind {812; X32-LABEL: test_ccp:813; X32: # %bb.0: # %entry814; X32-NEXT: pushl %esi815; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx816; X32-NEXT: movl {{[0-9]+}}(%esp), %edx817; X32-NEXT: movl {{[0-9]+}}(%esp), %esi818; X32-NEXT: xorl %eax, %eax819; X32-NEXT: #APP820; X32-NEXT: cmp %ecx,(%esi)821; X32-NEXT: #NO_APP822; X32-NEXT: setp %al823; X32-NEXT: popl %esi824; X32-NEXT: retl825;826; X64-LABEL: test_ccp:827; X64: # %bb.0: # %entry828; X64-NEXT: xorl %eax, %eax829; X64-NEXT: #APP830; X64-NEXT: cmp %rdi,(%rsi)831; X64-NEXT: #NO_APP832; X64-NEXT: setp %al833; X64-NEXT: retq834entry:835 %cc = tail call i32 asm "cmp $2,$1", "={@ccp},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i64) %addr, i64 %nr) nounwind836 %tobool = icmp ne i32 %cc, 0837 %rv = zext i1 %tobool to i32838 ret i32 %rv839}840 841 842define i32 @test_ccs(i64 %nr, ptr %addr) nounwind {843; X32-LABEL: test_ccs:844; X32: # %bb.0: # %entry845; X32-NEXT: pushl %esi846; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx847; X32-NEXT: movl {{[0-9]+}}(%esp), %edx848; X32-NEXT: movl {{[0-9]+}}(%esp), %esi849; X32-NEXT: xorl %eax, %eax850; X32-NEXT: #APP851; X32-NEXT: cmp %ecx,(%esi)852; X32-NEXT: #NO_APP853; X32-NEXT: sets %al854; X32-NEXT: popl %esi855; X32-NEXT: retl856;857; X64-LABEL: test_ccs:858; X64: # %bb.0: # %entry859; X64-NEXT: xorl %eax, %eax860; X64-NEXT: #APP861; X64-NEXT: cmp %rdi,(%rsi)862; X64-NEXT: #NO_APP863; X64-NEXT: sets %al864; X64-NEXT: retq865entry:866 %cc = tail call i32 asm "cmp $2,$1", "={@ccs},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i64) %addr, i64 %nr) nounwind867 %tobool = icmp ne i32 %cc, 0868 %rv = zext i1 %tobool to i32869 ret i32 %rv870}871 872declare void @bar()873 874define void @test_cca_branch(i64 %nr, ptr %addr) nounwind {875; X32-LABEL: test_cca_branch:876; X32: # %bb.0: # %entry877; X32-NEXT: movl {{[0-9]+}}(%esp), %eax878; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx879; X32-NEXT: movl {{[0-9]+}}(%esp), %edx880; X32-NEXT: #APP881; X32-NEXT: cmp %eax,(%edx)882; X32-NEXT: #NO_APP883; X32-NEXT: jbe .LBB28_2884; X32-NEXT: # %bb.1: # %then885; X32-NEXT: calll bar@PLT886; X32-NEXT: .LBB28_2: # %exit887; X32-NEXT: retl888;889; X64-LABEL: test_cca_branch:890; X64: # %bb.0: # %entry891; X64-NEXT: #APP892; X64-NEXT: cmp %rdi,(%rsi)893; X64-NEXT: #NO_APP894; X64-NEXT: jbe .LBB28_2895; X64-NEXT: # %bb.1: # %then896; X64-NEXT: pushq %rax897; X64-NEXT: callq bar@PLT898; X64-NEXT: addq $8, %rsp899; X64-NEXT: .LBB28_2: # %exit900; X64-NEXT: retq901entry:902 %cc = tail call i8 asm "cmp $2,$1", "={@cca},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i64) %addr, i64 %nr) nounwind903 %tobool = icmp ne i8 %cc, 0904 br i1 %tobool, label %then, label %exit905 906then:907 call void @bar()908 br label %exit909 910exit:911 ret void912}913 914define void @test_ccae_branch(i64 %nr, ptr %addr) nounwind {915; X32-LABEL: test_ccae_branch:916; X32: # %bb.0: # %entry917; X32-NEXT: movl {{[0-9]+}}(%esp), %eax918; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx919; X32-NEXT: movl {{[0-9]+}}(%esp), %edx920; X32-NEXT: #APP921; X32-NEXT: cmp %eax,(%edx)922; X32-NEXT: #NO_APP923; X32-NEXT: jb .LBB29_2924; X32-NEXT: # %bb.1: # %then925; X32-NEXT: calll bar@PLT926; X32-NEXT: .LBB29_2: # %exit927; X32-NEXT: retl928;929; X64-LABEL: test_ccae_branch:930; X64: # %bb.0: # %entry931; X64-NEXT: #APP932; X64-NEXT: cmp %rdi,(%rsi)933; X64-NEXT: #NO_APP934; X64-NEXT: jb .LBB29_2935; X64-NEXT: # %bb.1: # %then936; X64-NEXT: pushq %rax937; X64-NEXT: callq bar@PLT938; X64-NEXT: addq $8, %rsp939; X64-NEXT: .LBB29_2: # %exit940; X64-NEXT: retq941entry:942 %cc = tail call i8 asm "cmp $2,$1", "={@ccae},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i64) %addr, i64 %nr) nounwind943 %tobool = icmp ne i8 %cc, 0944 br i1 %tobool, label %then, label %exit945 946then:947 call void @bar()948 br label %exit949 950exit:951 ret void952}953 954define void @test_ccb_branch(i64 %nr, ptr %addr) nounwind {955; X32-LABEL: test_ccb_branch:956; X32: # %bb.0: # %entry957; X32-NEXT: movl {{[0-9]+}}(%esp), %eax958; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx959; X32-NEXT: movl {{[0-9]+}}(%esp), %edx960; X32-NEXT: #APP961; X32-NEXT: cmp %eax,(%edx)962; X32-NEXT: #NO_APP963; X32-NEXT: jae .LBB30_2964; X32-NEXT: # %bb.1: # %then965; X32-NEXT: calll bar@PLT966; X32-NEXT: .LBB30_2: # %exit967; X32-NEXT: retl968;969; X64-LABEL: test_ccb_branch:970; X64: # %bb.0: # %entry971; X64-NEXT: #APP972; X64-NEXT: cmp %rdi,(%rsi)973; X64-NEXT: #NO_APP974; X64-NEXT: jae .LBB30_2975; X64-NEXT: # %bb.1: # %then976; X64-NEXT: pushq %rax977; X64-NEXT: callq bar@PLT978; X64-NEXT: addq $8, %rsp979; X64-NEXT: .LBB30_2: # %exit980; X64-NEXT: retq981entry:982 %cc = tail call i8 asm "cmp $2,$1", "={@ccb},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i64) %addr, i64 %nr) nounwind983 %tobool = icmp ne i8 %cc, 0984 br i1 %tobool, label %then, label %exit985 986then:987 call void @bar()988 br label %exit989 990exit:991 ret void992}993 994define void @test_ccbe_branch(i64 %nr, ptr %addr) nounwind {995; X32-LABEL: test_ccbe_branch:996; X32: # %bb.0: # %entry997; X32-NEXT: movl {{[0-9]+}}(%esp), %eax998; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx999; X32-NEXT: movl {{[0-9]+}}(%esp), %edx1000; X32-NEXT: #APP1001; X32-NEXT: cmp %eax,(%edx)1002; X32-NEXT: #NO_APP1003; X32-NEXT: ja .LBB31_21004; X32-NEXT: # %bb.1: # %then1005; X32-NEXT: calll bar@PLT1006; X32-NEXT: .LBB31_2: # %exit1007; X32-NEXT: retl1008;1009; X64-LABEL: test_ccbe_branch:1010; X64: # %bb.0: # %entry1011; X64-NEXT: #APP1012; X64-NEXT: cmp %rdi,(%rsi)1013; X64-NEXT: #NO_APP1014; X64-NEXT: ja .LBB31_21015; X64-NEXT: # %bb.1: # %then1016; X64-NEXT: pushq %rax1017; X64-NEXT: callq bar@PLT1018; X64-NEXT: addq $8, %rsp1019; X64-NEXT: .LBB31_2: # %exit1020; X64-NEXT: retq1021entry:1022 %cc = tail call i8 asm "cmp $2,$1", "={@ccbe},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i64) %addr, i64 %nr) nounwind1023 %tobool = icmp ne i8 %cc, 01024 br i1 %tobool, label %then, label %exit1025 1026then:1027 call void @bar()1028 br label %exit1029 1030exit:1031 ret void1032}1033 1034define void @test_ccc_branch(i64 %nr, ptr %addr) nounwind {1035; X32-LABEL: test_ccc_branch:1036; X32: # %bb.0: # %entry1037; X32-NEXT: movl {{[0-9]+}}(%esp), %eax1038; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx1039; X32-NEXT: movl {{[0-9]+}}(%esp), %edx1040; X32-NEXT: #APP1041; X32-NEXT: cmp %eax,(%edx)1042; X32-NEXT: #NO_APP1043; X32-NEXT: jae .LBB32_21044; X32-NEXT: # %bb.1: # %then1045; X32-NEXT: calll bar@PLT1046; X32-NEXT: .LBB32_2: # %exit1047; X32-NEXT: retl1048;1049; X64-LABEL: test_ccc_branch:1050; X64: # %bb.0: # %entry1051; X64-NEXT: #APP1052; X64-NEXT: cmp %rdi,(%rsi)1053; X64-NEXT: #NO_APP1054; X64-NEXT: jae .LBB32_21055; X64-NEXT: # %bb.1: # %then1056; X64-NEXT: pushq %rax1057; X64-NEXT: callq bar@PLT1058; X64-NEXT: addq $8, %rsp1059; X64-NEXT: .LBB32_2: # %exit1060; X64-NEXT: retq1061entry:1062 %cc = tail call i8 asm "cmp $2,$1", "={@ccc},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i64) %addr, i64 %nr) nounwind1063 %tobool = icmp ne i8 %cc, 01064 br i1 %tobool, label %then, label %exit1065 1066then:1067 call void @bar()1068 br label %exit1069 1070exit:1071 ret void1072}1073 1074define void @test_cce_branch(i64 %nr, ptr %addr) nounwind {1075; X32-LABEL: test_cce_branch:1076; X32: # %bb.0: # %entry1077; X32-NEXT: movl {{[0-9]+}}(%esp), %eax1078; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx1079; X32-NEXT: movl {{[0-9]+}}(%esp), %edx1080; X32-NEXT: #APP1081; X32-NEXT: cmp %eax,(%edx)1082; X32-NEXT: #NO_APP1083; X32-NEXT: jne .LBB33_21084; X32-NEXT: # %bb.1: # %then1085; X32-NEXT: calll bar@PLT1086; X32-NEXT: .LBB33_2: # %exit1087; X32-NEXT: retl1088;1089; X64-LABEL: test_cce_branch:1090; X64: # %bb.0: # %entry1091; X64-NEXT: #APP1092; X64-NEXT: cmp %rdi,(%rsi)1093; X64-NEXT: #NO_APP1094; X64-NEXT: jne .LBB33_21095; X64-NEXT: # %bb.1: # %then1096; X64-NEXT: pushq %rax1097; X64-NEXT: callq bar@PLT1098; X64-NEXT: addq $8, %rsp1099; X64-NEXT: .LBB33_2: # %exit1100; X64-NEXT: retq1101entry:1102 %cc = tail call i8 asm "cmp $2,$1", "={@cce},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i64) %addr, i64 %nr) nounwind1103 %tobool = icmp ne i8 %cc, 01104 br i1 %tobool, label %then, label %exit1105 1106then:1107 call void @bar()1108 br label %exit1109 1110exit:1111 ret void1112}1113 1114define void @test_ccz_branch(i64 %nr, ptr %addr) nounwind {1115; X32-LABEL: test_ccz_branch:1116; X32: # %bb.0: # %entry1117; X32-NEXT: movl {{[0-9]+}}(%esp), %eax1118; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx1119; X32-NEXT: movl {{[0-9]+}}(%esp), %edx1120; X32-NEXT: #APP1121; X32-NEXT: cmp %eax,(%edx)1122; X32-NEXT: #NO_APP1123; X32-NEXT: jne .LBB34_21124; X32-NEXT: # %bb.1: # %then1125; X32-NEXT: calll bar@PLT1126; X32-NEXT: .LBB34_2: # %exit1127; X32-NEXT: retl1128;1129; X64-LABEL: test_ccz_branch:1130; X64: # %bb.0: # %entry1131; X64-NEXT: #APP1132; X64-NEXT: cmp %rdi,(%rsi)1133; X64-NEXT: #NO_APP1134; X64-NEXT: jne .LBB34_21135; X64-NEXT: # %bb.1: # %then1136; X64-NEXT: pushq %rax1137; X64-NEXT: callq bar@PLT1138; X64-NEXT: addq $8, %rsp1139; X64-NEXT: .LBB34_2: # %exit1140; X64-NEXT: retq1141entry:1142 %cc = tail call i8 asm "cmp $2,$1", "={@ccz},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i64) %addr, i64 %nr) nounwind1143 %tobool = icmp ne i8 %cc, 01144 br i1 %tobool, label %then, label %exit1145 1146then:1147 call void @bar()1148 br label %exit1149 1150exit:1151 ret void1152}1153 1154define void @test_ccg_branch(i64 %nr, ptr %addr) nounwind {1155; X32-LABEL: test_ccg_branch:1156; X32: # %bb.0: # %entry1157; X32-NEXT: movl {{[0-9]+}}(%esp), %eax1158; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx1159; X32-NEXT: movl {{[0-9]+}}(%esp), %edx1160; X32-NEXT: #APP1161; X32-NEXT: cmp %eax,(%edx)1162; X32-NEXT: #NO_APP1163; X32-NEXT: jle .LBB35_21164; X32-NEXT: # %bb.1: # %then1165; X32-NEXT: calll bar@PLT1166; X32-NEXT: .LBB35_2: # %exit1167; X32-NEXT: retl1168;1169; X64-LABEL: test_ccg_branch:1170; X64: # %bb.0: # %entry1171; X64-NEXT: #APP1172; X64-NEXT: cmp %rdi,(%rsi)1173; X64-NEXT: #NO_APP1174; X64-NEXT: jle .LBB35_21175; X64-NEXT: # %bb.1: # %then1176; X64-NEXT: pushq %rax1177; X64-NEXT: callq bar@PLT1178; X64-NEXT: addq $8, %rsp1179; X64-NEXT: .LBB35_2: # %exit1180; X64-NEXT: retq1181entry:1182 %cc = tail call i8 asm "cmp $2,$1", "={@ccg},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i64) %addr, i64 %nr) nounwind1183 %tobool = icmp ne i8 %cc, 01184 br i1 %tobool, label %then, label %exit1185 1186then:1187 call void @bar()1188 br label %exit1189 1190exit:1191 ret void1192}1193 1194define void @test_ccge_branch(i64 %nr, ptr %addr) nounwind {1195; X32-LABEL: test_ccge_branch:1196; X32: # %bb.0: # %entry1197; X32-NEXT: movl {{[0-9]+}}(%esp), %eax1198; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx1199; X32-NEXT: movl {{[0-9]+}}(%esp), %edx1200; X32-NEXT: #APP1201; X32-NEXT: cmp %eax,(%edx)1202; X32-NEXT: #NO_APP1203; X32-NEXT: jl .LBB36_21204; X32-NEXT: # %bb.1: # %then1205; X32-NEXT: calll bar@PLT1206; X32-NEXT: .LBB36_2: # %exit1207; X32-NEXT: retl1208;1209; X64-LABEL: test_ccge_branch:1210; X64: # %bb.0: # %entry1211; X64-NEXT: #APP1212; X64-NEXT: cmp %rdi,(%rsi)1213; X64-NEXT: #NO_APP1214; X64-NEXT: jl .LBB36_21215; X64-NEXT: # %bb.1: # %then1216; X64-NEXT: pushq %rax1217; X64-NEXT: callq bar@PLT1218; X64-NEXT: addq $8, %rsp1219; X64-NEXT: .LBB36_2: # %exit1220; X64-NEXT: retq1221entry:1222 %cc = tail call i8 asm "cmp $2,$1", "={@ccge},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i64) %addr, i64 %nr) nounwind1223 %tobool = icmp ne i8 %cc, 01224 br i1 %tobool, label %then, label %exit1225 1226then:1227 call void @bar()1228 br label %exit1229 1230exit:1231 ret void1232}1233 1234define void @test_ccl_branch(i64 %nr, ptr %addr) nounwind {1235; X32-LABEL: test_ccl_branch:1236; X32: # %bb.0: # %entry1237; X32-NEXT: movl {{[0-9]+}}(%esp), %eax1238; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx1239; X32-NEXT: movl {{[0-9]+}}(%esp), %edx1240; X32-NEXT: #APP1241; X32-NEXT: cmp %eax,(%edx)1242; X32-NEXT: #NO_APP1243; X32-NEXT: jge .LBB37_21244; X32-NEXT: # %bb.1: # %then1245; X32-NEXT: calll bar@PLT1246; X32-NEXT: .LBB37_2: # %exit1247; X32-NEXT: retl1248;1249; X64-LABEL: test_ccl_branch:1250; X64: # %bb.0: # %entry1251; X64-NEXT: #APP1252; X64-NEXT: cmp %rdi,(%rsi)1253; X64-NEXT: #NO_APP1254; X64-NEXT: jge .LBB37_21255; X64-NEXT: # %bb.1: # %then1256; X64-NEXT: pushq %rax1257; X64-NEXT: callq bar@PLT1258; X64-NEXT: addq $8, %rsp1259; X64-NEXT: .LBB37_2: # %exit1260; X64-NEXT: retq1261entry:1262 %cc = tail call i8 asm "cmp $2,$1", "={@ccl},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i64) %addr, i64 %nr) nounwind1263 %tobool = icmp ne i8 %cc, 01264 br i1 %tobool, label %then, label %exit1265 1266then:1267 call void @bar()1268 br label %exit1269 1270exit:1271 ret void1272}1273 1274define void @test_ccle_branch(i64 %nr, ptr %addr) nounwind {1275; X32-LABEL: test_ccle_branch:1276; X32: # %bb.0: # %entry1277; X32-NEXT: movl {{[0-9]+}}(%esp), %eax1278; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx1279; X32-NEXT: movl {{[0-9]+}}(%esp), %edx1280; X32-NEXT: #APP1281; X32-NEXT: cmp %eax,(%edx)1282; X32-NEXT: #NO_APP1283; X32-NEXT: jg .LBB38_21284; X32-NEXT: # %bb.1: # %then1285; X32-NEXT: calll bar@PLT1286; X32-NEXT: .LBB38_2: # %exit1287; X32-NEXT: retl1288;1289; X64-LABEL: test_ccle_branch:1290; X64: # %bb.0: # %entry1291; X64-NEXT: #APP1292; X64-NEXT: cmp %rdi,(%rsi)1293; X64-NEXT: #NO_APP1294; X64-NEXT: jg .LBB38_21295; X64-NEXT: # %bb.1: # %then1296; X64-NEXT: pushq %rax1297; X64-NEXT: callq bar@PLT1298; X64-NEXT: addq $8, %rsp1299; X64-NEXT: .LBB38_2: # %exit1300; X64-NEXT: retq1301entry:1302 %cc = tail call i8 asm "cmp $2,$1", "={@ccle},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i64) %addr, i64 %nr) nounwind1303 %tobool = icmp ne i8 %cc, 01304 br i1 %tobool, label %then, label %exit1305 1306then:1307 call void @bar()1308 br label %exit1309 1310exit:1311 ret void1312}1313 1314define void @test_ccna_branch(i64 %nr, ptr %addr) nounwind {1315; X32-LABEL: test_ccna_branch:1316; X32: # %bb.0: # %entry1317; X32-NEXT: movl {{[0-9]+}}(%esp), %eax1318; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx1319; X32-NEXT: movl {{[0-9]+}}(%esp), %edx1320; X32-NEXT: #APP1321; X32-NEXT: cmp %eax,(%edx)1322; X32-NEXT: #NO_APP1323; X32-NEXT: ja .LBB39_21324; X32-NEXT: # %bb.1: # %then1325; X32-NEXT: calll bar@PLT1326; X32-NEXT: .LBB39_2: # %exit1327; X32-NEXT: retl1328;1329; X64-LABEL: test_ccna_branch:1330; X64: # %bb.0: # %entry1331; X64-NEXT: #APP1332; X64-NEXT: cmp %rdi,(%rsi)1333; X64-NEXT: #NO_APP1334; X64-NEXT: ja .LBB39_21335; X64-NEXT: # %bb.1: # %then1336; X64-NEXT: pushq %rax1337; X64-NEXT: callq bar@PLT1338; X64-NEXT: addq $8, %rsp1339; X64-NEXT: .LBB39_2: # %exit1340; X64-NEXT: retq1341entry:1342 %cc = tail call i8 asm "cmp $2,$1", "={@ccna},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i64) %addr, i64 %nr) nounwind1343 %tobool = icmp ne i8 %cc, 01344 br i1 %tobool, label %then, label %exit1345 1346then:1347 call void @bar()1348 br label %exit1349 1350exit:1351 ret void1352}1353 1354define void @test_ccnae_branch(i64 %nr, ptr %addr) nounwind {1355; X32-LABEL: test_ccnae_branch:1356; X32: # %bb.0: # %entry1357; X32-NEXT: movl {{[0-9]+}}(%esp), %eax1358; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx1359; X32-NEXT: movl {{[0-9]+}}(%esp), %edx1360; X32-NEXT: #APP1361; X32-NEXT: cmp %eax,(%edx)1362; X32-NEXT: #NO_APP1363; X32-NEXT: jae .LBB40_21364; X32-NEXT: # %bb.1: # %then1365; X32-NEXT: calll bar@PLT1366; X32-NEXT: .LBB40_2: # %exit1367; X32-NEXT: retl1368;1369; X64-LABEL: test_ccnae_branch:1370; X64: # %bb.0: # %entry1371; X64-NEXT: #APP1372; X64-NEXT: cmp %rdi,(%rsi)1373; X64-NEXT: #NO_APP1374; X64-NEXT: jae .LBB40_21375; X64-NEXT: # %bb.1: # %then1376; X64-NEXT: pushq %rax1377; X64-NEXT: callq bar@PLT1378; X64-NEXT: addq $8, %rsp1379; X64-NEXT: .LBB40_2: # %exit1380; X64-NEXT: retq1381entry:1382 %cc = tail call i8 asm "cmp $2,$1", "={@ccnae},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i64) %addr, i64 %nr) nounwind1383 %tobool = icmp ne i8 %cc, 01384 br i1 %tobool, label %then, label %exit1385 1386then:1387 call void @bar()1388 br label %exit1389 1390exit:1391 ret void1392}1393 1394define void @test_ccnb_branch(i64 %nr, ptr %addr) nounwind {1395; X32-LABEL: test_ccnb_branch:1396; X32: # %bb.0: # %entry1397; X32-NEXT: movl {{[0-9]+}}(%esp), %eax1398; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx1399; X32-NEXT: movl {{[0-9]+}}(%esp), %edx1400; X32-NEXT: #APP1401; X32-NEXT: cmp %eax,(%edx)1402; X32-NEXT: #NO_APP1403; X32-NEXT: jb .LBB41_21404; X32-NEXT: # %bb.1: # %then1405; X32-NEXT: calll bar@PLT1406; X32-NEXT: .LBB41_2: # %exit1407; X32-NEXT: retl1408;1409; X64-LABEL: test_ccnb_branch:1410; X64: # %bb.0: # %entry1411; X64-NEXT: #APP1412; X64-NEXT: cmp %rdi,(%rsi)1413; X64-NEXT: #NO_APP1414; X64-NEXT: jb .LBB41_21415; X64-NEXT: # %bb.1: # %then1416; X64-NEXT: pushq %rax1417; X64-NEXT: callq bar@PLT1418; X64-NEXT: addq $8, %rsp1419; X64-NEXT: .LBB41_2: # %exit1420; X64-NEXT: retq1421entry:1422 %cc = tail call i8 asm "cmp $2,$1", "={@ccnb},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i64) %addr, i64 %nr) nounwind1423 %tobool = icmp ne i8 %cc, 01424 br i1 %tobool, label %then, label %exit1425 1426then:1427 call void @bar()1428 br label %exit1429 1430exit:1431 ret void1432}1433 1434define void @test_ccnbe_branch(i64 %nr, ptr %addr) nounwind {1435; X32-LABEL: test_ccnbe_branch:1436; X32: # %bb.0: # %entry1437; X32-NEXT: movl {{[0-9]+}}(%esp), %eax1438; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx1439; X32-NEXT: movl {{[0-9]+}}(%esp), %edx1440; X32-NEXT: #APP1441; X32-NEXT: cmp %eax,(%edx)1442; X32-NEXT: #NO_APP1443; X32-NEXT: jbe .LBB42_21444; X32-NEXT: # %bb.1: # %then1445; X32-NEXT: calll bar@PLT1446; X32-NEXT: .LBB42_2: # %exit1447; X32-NEXT: retl1448;1449; X64-LABEL: test_ccnbe_branch:1450; X64: # %bb.0: # %entry1451; X64-NEXT: #APP1452; X64-NEXT: cmp %rdi,(%rsi)1453; X64-NEXT: #NO_APP1454; X64-NEXT: jbe .LBB42_21455; X64-NEXT: # %bb.1: # %then1456; X64-NEXT: pushq %rax1457; X64-NEXT: callq bar@PLT1458; X64-NEXT: addq $8, %rsp1459; X64-NEXT: .LBB42_2: # %exit1460; X64-NEXT: retq1461entry:1462 %cc = tail call i8 asm "cmp $2,$1", "={@ccnbe},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i64) %addr, i64 %nr) nounwind1463 %tobool = icmp ne i8 %cc, 01464 br i1 %tobool, label %then, label %exit1465 1466then:1467 call void @bar()1468 br label %exit1469 1470exit:1471 ret void1472}1473 1474define void @test_ccnc_branch(i64 %nr, ptr %addr) nounwind {1475; X32-LABEL: test_ccnc_branch:1476; X32: # %bb.0: # %entry1477; X32-NEXT: movl {{[0-9]+}}(%esp), %eax1478; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx1479; X32-NEXT: movl {{[0-9]+}}(%esp), %edx1480; X32-NEXT: #APP1481; X32-NEXT: cmp %eax,(%edx)1482; X32-NEXT: #NO_APP1483; X32-NEXT: jb .LBB43_21484; X32-NEXT: # %bb.1: # %then1485; X32-NEXT: calll bar@PLT1486; X32-NEXT: .LBB43_2: # %exit1487; X32-NEXT: retl1488;1489; X64-LABEL: test_ccnc_branch:1490; X64: # %bb.0: # %entry1491; X64-NEXT: #APP1492; X64-NEXT: cmp %rdi,(%rsi)1493; X64-NEXT: #NO_APP1494; X64-NEXT: jb .LBB43_21495; X64-NEXT: # %bb.1: # %then1496; X64-NEXT: pushq %rax1497; X64-NEXT: callq bar@PLT1498; X64-NEXT: addq $8, %rsp1499; X64-NEXT: .LBB43_2: # %exit1500; X64-NEXT: retq1501entry:1502 %cc = tail call i8 asm "cmp $2,$1", "={@ccnc},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i64) %addr, i64 %nr) nounwind1503 %tobool = icmp ne i8 %cc, 01504 br i1 %tobool, label %then, label %exit1505 1506then:1507 call void @bar()1508 br label %exit1509 1510exit:1511 ret void1512}1513 1514define void @test_ccne_branch(i64 %nr, ptr %addr) nounwind {1515; X32-LABEL: test_ccne_branch:1516; X32: # %bb.0: # %entry1517; X32-NEXT: movl {{[0-9]+}}(%esp), %eax1518; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx1519; X32-NEXT: movl {{[0-9]+}}(%esp), %edx1520; X32-NEXT: #APP1521; X32-NEXT: cmp %eax,(%edx)1522; X32-NEXT: #NO_APP1523; X32-NEXT: je .LBB44_21524; X32-NEXT: # %bb.1: # %then1525; X32-NEXT: calll bar@PLT1526; X32-NEXT: .LBB44_2: # %exit1527; X32-NEXT: retl1528;1529; X64-LABEL: test_ccne_branch:1530; X64: # %bb.0: # %entry1531; X64-NEXT: #APP1532; X64-NEXT: cmp %rdi,(%rsi)1533; X64-NEXT: #NO_APP1534; X64-NEXT: je .LBB44_21535; X64-NEXT: # %bb.1: # %then1536; X64-NEXT: pushq %rax1537; X64-NEXT: callq bar@PLT1538; X64-NEXT: addq $8, %rsp1539; X64-NEXT: .LBB44_2: # %exit1540; X64-NEXT: retq1541entry:1542 %cc = tail call i8 asm "cmp $2,$1", "={@ccne},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i64) %addr, i64 %nr) nounwind1543 %tobool = icmp ne i8 %cc, 01544 br i1 %tobool, label %then, label %exit1545 1546then:1547 call void @bar()1548 br label %exit1549 1550exit:1551 ret void1552}1553 1554define void @test_ccnz_branch(i64 %nr, ptr %addr) nounwind {1555; X32-LABEL: test_ccnz_branch:1556; X32: # %bb.0: # %entry1557; X32-NEXT: movl {{[0-9]+}}(%esp), %eax1558; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx1559; X32-NEXT: movl {{[0-9]+}}(%esp), %edx1560; X32-NEXT: #APP1561; X32-NEXT: cmp %eax,(%edx)1562; X32-NEXT: #NO_APP1563; X32-NEXT: je .LBB45_21564; X32-NEXT: # %bb.1: # %then1565; X32-NEXT: calll bar@PLT1566; X32-NEXT: .LBB45_2: # %exit1567; X32-NEXT: retl1568;1569; X64-LABEL: test_ccnz_branch:1570; X64: # %bb.0: # %entry1571; X64-NEXT: #APP1572; X64-NEXT: cmp %rdi,(%rsi)1573; X64-NEXT: #NO_APP1574; X64-NEXT: je .LBB45_21575; X64-NEXT: # %bb.1: # %then1576; X64-NEXT: pushq %rax1577; X64-NEXT: callq bar@PLT1578; X64-NEXT: addq $8, %rsp1579; X64-NEXT: .LBB45_2: # %exit1580; X64-NEXT: retq1581entry:1582 %cc = tail call i8 asm "cmp $2,$1", "={@ccnz},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i64) %addr, i64 %nr) nounwind1583 %tobool = icmp ne i8 %cc, 01584 br i1 %tobool, label %then, label %exit1585 1586then:1587 call void @bar()1588 br label %exit1589 1590exit:1591 ret void1592}1593 1594define void @test_ccng_branch(i64 %nr, ptr %addr) nounwind {1595; X32-LABEL: test_ccng_branch:1596; X32: # %bb.0: # %entry1597; X32-NEXT: movl {{[0-9]+}}(%esp), %eax1598; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx1599; X32-NEXT: movl {{[0-9]+}}(%esp), %edx1600; X32-NEXT: #APP1601; X32-NEXT: cmp %eax,(%edx)1602; X32-NEXT: #NO_APP1603; X32-NEXT: jg .LBB46_21604; X32-NEXT: # %bb.1: # %then1605; X32-NEXT: calll bar@PLT1606; X32-NEXT: .LBB46_2: # %exit1607; X32-NEXT: retl1608;1609; X64-LABEL: test_ccng_branch:1610; X64: # %bb.0: # %entry1611; X64-NEXT: #APP1612; X64-NEXT: cmp %rdi,(%rsi)1613; X64-NEXT: #NO_APP1614; X64-NEXT: jg .LBB46_21615; X64-NEXT: # %bb.1: # %then1616; X64-NEXT: pushq %rax1617; X64-NEXT: callq bar@PLT1618; X64-NEXT: addq $8, %rsp1619; X64-NEXT: .LBB46_2: # %exit1620; X64-NEXT: retq1621entry:1622 %cc = tail call i8 asm "cmp $2,$1", "={@ccng},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i64) %addr, i64 %nr) nounwind1623 %tobool = icmp ne i8 %cc, 01624 br i1 %tobool, label %then, label %exit1625 1626then:1627 call void @bar()1628 br label %exit1629 1630exit:1631 ret void1632}1633 1634define void @test_ccnge_branch(i64 %nr, ptr %addr) nounwind {1635; X32-LABEL: test_ccnge_branch:1636; X32: # %bb.0: # %entry1637; X32-NEXT: movl {{[0-9]+}}(%esp), %eax1638; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx1639; X32-NEXT: movl {{[0-9]+}}(%esp), %edx1640; X32-NEXT: #APP1641; X32-NEXT: cmp %eax,(%edx)1642; X32-NEXT: #NO_APP1643; X32-NEXT: jge .LBB47_21644; X32-NEXT: # %bb.1: # %then1645; X32-NEXT: calll bar@PLT1646; X32-NEXT: .LBB47_2: # %exit1647; X32-NEXT: retl1648;1649; X64-LABEL: test_ccnge_branch:1650; X64: # %bb.0: # %entry1651; X64-NEXT: #APP1652; X64-NEXT: cmp %rdi,(%rsi)1653; X64-NEXT: #NO_APP1654; X64-NEXT: jge .LBB47_21655; X64-NEXT: # %bb.1: # %then1656; X64-NEXT: pushq %rax1657; X64-NEXT: callq bar@PLT1658; X64-NEXT: addq $8, %rsp1659; X64-NEXT: .LBB47_2: # %exit1660; X64-NEXT: retq1661entry:1662 %cc = tail call i8 asm "cmp $2,$1", "={@ccnge},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i64) %addr, i64 %nr) nounwind1663 %tobool = icmp ne i8 %cc, 01664 br i1 %tobool, label %then, label %exit1665 1666then:1667 call void @bar()1668 br label %exit1669 1670exit:1671 ret void1672}1673 1674define void @test_ccnl_branch(i64 %nr, ptr %addr) nounwind {1675; X32-LABEL: test_ccnl_branch:1676; X32: # %bb.0: # %entry1677; X32-NEXT: movl {{[0-9]+}}(%esp), %eax1678; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx1679; X32-NEXT: movl {{[0-9]+}}(%esp), %edx1680; X32-NEXT: #APP1681; X32-NEXT: cmp %eax,(%edx)1682; X32-NEXT: #NO_APP1683; X32-NEXT: jl .LBB48_21684; X32-NEXT: # %bb.1: # %then1685; X32-NEXT: calll bar@PLT1686; X32-NEXT: .LBB48_2: # %exit1687; X32-NEXT: retl1688;1689; X64-LABEL: test_ccnl_branch:1690; X64: # %bb.0: # %entry1691; X64-NEXT: #APP1692; X64-NEXT: cmp %rdi,(%rsi)1693; X64-NEXT: #NO_APP1694; X64-NEXT: jl .LBB48_21695; X64-NEXT: # %bb.1: # %then1696; X64-NEXT: pushq %rax1697; X64-NEXT: callq bar@PLT1698; X64-NEXT: addq $8, %rsp1699; X64-NEXT: .LBB48_2: # %exit1700; X64-NEXT: retq1701entry:1702 %cc = tail call i8 asm "cmp $2,$1", "={@ccnl},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i64) %addr, i64 %nr) nounwind1703 %tobool = icmp ne i8 %cc, 01704 br i1 %tobool, label %then, label %exit1705 1706then:1707 call void @bar()1708 br label %exit1709 1710exit:1711 ret void1712}1713 1714define void @test_ccnle_branch(i64 %nr, ptr %addr) nounwind {1715; X32-LABEL: test_ccnle_branch:1716; X32: # %bb.0: # %entry1717; X32-NEXT: movl {{[0-9]+}}(%esp), %eax1718; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx1719; X32-NEXT: movl {{[0-9]+}}(%esp), %edx1720; X32-NEXT: #APP1721; X32-NEXT: cmp %eax,(%edx)1722; X32-NEXT: #NO_APP1723; X32-NEXT: jle .LBB49_21724; X32-NEXT: # %bb.1: # %then1725; X32-NEXT: calll bar@PLT1726; X32-NEXT: .LBB49_2: # %exit1727; X32-NEXT: retl1728;1729; X64-LABEL: test_ccnle_branch:1730; X64: # %bb.0: # %entry1731; X64-NEXT: #APP1732; X64-NEXT: cmp %rdi,(%rsi)1733; X64-NEXT: #NO_APP1734; X64-NEXT: jle .LBB49_21735; X64-NEXT: # %bb.1: # %then1736; X64-NEXT: pushq %rax1737; X64-NEXT: callq bar@PLT1738; X64-NEXT: addq $8, %rsp1739; X64-NEXT: .LBB49_2: # %exit1740; X64-NEXT: retq1741entry:1742 %cc = tail call i8 asm "cmp $2,$1", "={@ccnle},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i64) %addr, i64 %nr) nounwind1743 %tobool = icmp ne i8 %cc, 01744 br i1 %tobool, label %then, label %exit1745 1746then:1747 call void @bar()1748 br label %exit1749 1750exit:1751 ret void1752}1753 1754define void @test_ccno_branch(i64 %nr, ptr %addr) nounwind {1755; X32-LABEL: test_ccno_branch:1756; X32: # %bb.0: # %entry1757; X32-NEXT: movl {{[0-9]+}}(%esp), %eax1758; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx1759; X32-NEXT: movl {{[0-9]+}}(%esp), %edx1760; X32-NEXT: #APP1761; X32-NEXT: cmp %eax,(%edx)1762; X32-NEXT: #NO_APP1763; X32-NEXT: jo .LBB50_21764; X32-NEXT: # %bb.1: # %then1765; X32-NEXT: calll bar@PLT1766; X32-NEXT: .LBB50_2: # %exit1767; X32-NEXT: retl1768;1769; X64-LABEL: test_ccno_branch:1770; X64: # %bb.0: # %entry1771; X64-NEXT: #APP1772; X64-NEXT: cmp %rdi,(%rsi)1773; X64-NEXT: #NO_APP1774; X64-NEXT: jo .LBB50_21775; X64-NEXT: # %bb.1: # %then1776; X64-NEXT: pushq %rax1777; X64-NEXT: callq bar@PLT1778; X64-NEXT: addq $8, %rsp1779; X64-NEXT: .LBB50_2: # %exit1780; X64-NEXT: retq1781entry:1782 %cc = tail call i8 asm "cmp $2,$1", "={@ccno},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i64) %addr, i64 %nr) nounwind1783 %tobool = icmp ne i8 %cc, 01784 br i1 %tobool, label %then, label %exit1785 1786then:1787 call void @bar()1788 br label %exit1789 1790exit:1791 ret void1792}1793 1794define void @test_ccnp_branch(i64 %nr, ptr %addr) nounwind {1795; X32-LABEL: test_ccnp_branch:1796; X32: # %bb.0: # %entry1797; X32-NEXT: movl {{[0-9]+}}(%esp), %eax1798; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx1799; X32-NEXT: movl {{[0-9]+}}(%esp), %edx1800; X32-NEXT: #APP1801; X32-NEXT: cmp %eax,(%edx)1802; X32-NEXT: #NO_APP1803; X32-NEXT: jp .LBB51_21804; X32-NEXT: # %bb.1: # %then1805; X32-NEXT: calll bar@PLT1806; X32-NEXT: .LBB51_2: # %exit1807; X32-NEXT: retl1808;1809; X64-LABEL: test_ccnp_branch:1810; X64: # %bb.0: # %entry1811; X64-NEXT: #APP1812; X64-NEXT: cmp %rdi,(%rsi)1813; X64-NEXT: #NO_APP1814; X64-NEXT: jp .LBB51_21815; X64-NEXT: # %bb.1: # %then1816; X64-NEXT: pushq %rax1817; X64-NEXT: callq bar@PLT1818; X64-NEXT: addq $8, %rsp1819; X64-NEXT: .LBB51_2: # %exit1820; X64-NEXT: retq1821entry:1822 %cc = tail call i8 asm "cmp $2,$1", "={@ccnp},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i64) %addr, i64 %nr) nounwind1823 %tobool = icmp ne i8 %cc, 01824 br i1 %tobool, label %then, label %exit1825 1826then:1827 call void @bar()1828 br label %exit1829 1830exit:1831 ret void1832}1833 1834define void @test_ccns_branch(i64 %nr, ptr %addr) nounwind {1835; X32-LABEL: test_ccns_branch:1836; X32: # %bb.0: # %entry1837; X32-NEXT: movl {{[0-9]+}}(%esp), %eax1838; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx1839; X32-NEXT: movl {{[0-9]+}}(%esp), %edx1840; X32-NEXT: #APP1841; X32-NEXT: cmp %eax,(%edx)1842; X32-NEXT: #NO_APP1843; X32-NEXT: js .LBB52_21844; X32-NEXT: # %bb.1: # %then1845; X32-NEXT: calll bar@PLT1846; X32-NEXT: .LBB52_2: # %exit1847; X32-NEXT: retl1848;1849; X64-LABEL: test_ccns_branch:1850; X64: # %bb.0: # %entry1851; X64-NEXT: #APP1852; X64-NEXT: cmp %rdi,(%rsi)1853; X64-NEXT: #NO_APP1854; X64-NEXT: js .LBB52_21855; X64-NEXT: # %bb.1: # %then1856; X64-NEXT: pushq %rax1857; X64-NEXT: callq bar@PLT1858; X64-NEXT: addq $8, %rsp1859; X64-NEXT: .LBB52_2: # %exit1860; X64-NEXT: retq1861entry:1862 %cc = tail call i8 asm "cmp $2,$1", "={@ccns},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i64) %addr, i64 %nr) nounwind1863 %tobool = icmp ne i8 %cc, 01864 br i1 %tobool, label %then, label %exit1865 1866then:1867 call void @bar()1868 br label %exit1869 1870exit:1871 ret void1872}1873 1874define void @test_cco_branch(i64 %nr, ptr %addr) nounwind {1875; X32-LABEL: test_cco_branch:1876; X32: # %bb.0: # %entry1877; X32-NEXT: movl {{[0-9]+}}(%esp), %eax1878; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx1879; X32-NEXT: movl {{[0-9]+}}(%esp), %edx1880; X32-NEXT: #APP1881; X32-NEXT: cmp %eax,(%edx)1882; X32-NEXT: #NO_APP1883; X32-NEXT: jno .LBB53_21884; X32-NEXT: # %bb.1: # %then1885; X32-NEXT: calll bar@PLT1886; X32-NEXT: .LBB53_2: # %exit1887; X32-NEXT: retl1888;1889; X64-LABEL: test_cco_branch:1890; X64: # %bb.0: # %entry1891; X64-NEXT: #APP1892; X64-NEXT: cmp %rdi,(%rsi)1893; X64-NEXT: #NO_APP1894; X64-NEXT: jno .LBB53_21895; X64-NEXT: # %bb.1: # %then1896; X64-NEXT: pushq %rax1897; X64-NEXT: callq bar@PLT1898; X64-NEXT: addq $8, %rsp1899; X64-NEXT: .LBB53_2: # %exit1900; X64-NEXT: retq1901entry:1902 %cc = tail call i8 asm "cmp $2,$1", "={@cco},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i64) %addr, i64 %nr) nounwind1903 %tobool = icmp ne i8 %cc, 01904 br i1 %tobool, label %then, label %exit1905 1906then:1907 call void @bar()1908 br label %exit1909 1910exit:1911 ret void1912}1913 1914define void @test_ccp_branch(i64 %nr, ptr %addr) nounwind {1915; X32-LABEL: test_ccp_branch:1916; X32: # %bb.0: # %entry1917; X32-NEXT: movl {{[0-9]+}}(%esp), %eax1918; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx1919; X32-NEXT: movl {{[0-9]+}}(%esp), %edx1920; X32-NEXT: #APP1921; X32-NEXT: cmp %eax,(%edx)1922; X32-NEXT: #NO_APP1923; X32-NEXT: jnp .LBB54_21924; X32-NEXT: # %bb.1: # %then1925; X32-NEXT: calll bar@PLT1926; X32-NEXT: .LBB54_2: # %exit1927; X32-NEXT: retl1928;1929; X64-LABEL: test_ccp_branch:1930; X64: # %bb.0: # %entry1931; X64-NEXT: #APP1932; X64-NEXT: cmp %rdi,(%rsi)1933; X64-NEXT: #NO_APP1934; X64-NEXT: jnp .LBB54_21935; X64-NEXT: # %bb.1: # %then1936; X64-NEXT: pushq %rax1937; X64-NEXT: callq bar@PLT1938; X64-NEXT: addq $8, %rsp1939; X64-NEXT: .LBB54_2: # %exit1940; X64-NEXT: retq1941entry:1942 %cc = tail call i8 asm "cmp $2,$1", "={@ccp},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i64) %addr, i64 %nr) nounwind1943 %tobool = icmp ne i8 %cc, 01944 br i1 %tobool, label %then, label %exit1945 1946then:1947 call void @bar()1948 br label %exit1949 1950exit:1951 ret void1952}1953 1954define void @test_ccs_branch(i64 %nr, ptr %addr) nounwind {1955; X32-LABEL: test_ccs_branch:1956; X32: # %bb.0: # %entry1957; X32-NEXT: movl {{[0-9]+}}(%esp), %eax1958; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx1959; X32-NEXT: movl {{[0-9]+}}(%esp), %edx1960; X32-NEXT: #APP1961; X32-NEXT: cmp %eax,(%edx)1962; X32-NEXT: #NO_APP1963; X32-NEXT: jns .LBB55_21964; X32-NEXT: # %bb.1: # %then1965; X32-NEXT: calll bar@PLT1966; X32-NEXT: .LBB55_2: # %exit1967; X32-NEXT: retl1968;1969; X64-LABEL: test_ccs_branch:1970; X64: # %bb.0: # %entry1971; X64-NEXT: #APP1972; X64-NEXT: cmp %rdi,(%rsi)1973; X64-NEXT: #NO_APP1974; X64-NEXT: jns .LBB55_21975; X64-NEXT: # %bb.1: # %then1976; X64-NEXT: pushq %rax1977; X64-NEXT: callq bar@PLT1978; X64-NEXT: addq $8, %rsp1979; X64-NEXT: .LBB55_2: # %exit1980; X64-NEXT: retq1981entry:1982 %cc = tail call i8 asm "cmp $2,$1", "={@ccs},=*m,r,~{cc},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i64) %addr, i64 %nr) nounwind1983 %tobool = icmp ne i8 %cc, 01984 br i1 %tobool, label %then, label %exit1985 1986then:1987 call void @bar()1988 br label %exit1989 1990exit:1991 ret void1992}1993