1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py 2; RUN: llc < %s -global-isel=0 -mtriple=x86_64-apple-darwin10 -verify-machineinstrs | FileCheck %s --check-prefixes=X64,SDAG 3; RUN: llc < %s -fast-isel -fast-isel-abort=1 -mtriple=x86_64-apple-darwin10 -verify-machineinstrs | FileCheck %s --check-prefixes=X64,FASTISEL 4; RUN: llc < %s -global-isel -global-isel-abort=1 -mtriple=x86_64-apple-darwin10 -verify-machineinstrs | FileCheck %s --check-prefixes=GISEL-X64 5; RUN: llc < %s -global-isel=0 -mtriple=i686-apple-darwin10 -verify-machineinstrs | FileCheck %s --check-prefixes=X86,SDAG 6; RUN: llc < %s -fast-isel -fast-isel-abort=1 -mtriple=i686-apple-darwin10 -verify-machineinstrs | FileCheck %s --check-prefixes=X86,FASTISEL 7; RUN: llc < %s -global-isel -global-isel-abort=1 -mtriple=i686-apple-darwin10 -verify-machineinstrs | FileCheck %s --check-prefixes=GISEL-X86 8 9define i32 @icmp_eq_2(i32 %x, i32 %y) { 10; X64-LABEL: icmp_eq_2: 11; X64: ## %bb.0: 12; X64-NEXT: cmpl %esi, %edi 13; X64-NEXT: jne LBB0_1 14; X64-NEXT: ## %bb.2: ## %bb1 15; X64-NEXT: xorl %eax, %eax 16; X64-NEXT: retq 17; X64-NEXT: LBB0_1: ## %bb2 18; X64-NEXT: movl $1, %eax 19; X64-NEXT: retq 20; 21; GISEL-X64-LABEL: icmp_eq_2: 22; GISEL-X64: ## %bb.0: 23; GISEL-X64-NEXT: cmpl %esi, %edi 24; GISEL-X64-NEXT: sete %al 25; GISEL-X64-NEXT: testb $1, %al 26; GISEL-X64-NEXT: je LBB0_1 27; GISEL-X64-NEXT: ## %bb.2: ## %bb1 28; GISEL-X64-NEXT: xorl %eax, %eax 29; GISEL-X64-NEXT: retq 30; GISEL-X64-NEXT: LBB0_1: ## %bb2 31; GISEL-X64-NEXT: movl $1, %eax 32; GISEL-X64-NEXT: retq 33; 34; X86-LABEL: icmp_eq_2: 35; X86: ## %bb.0: 36; X86-NEXT: movl {{[0-9]+}}(%esp), %eax 37; X86-NEXT: cmpl {{[0-9]+\(%esp\), %eax|%eax, [0-9]+\(%esp\)}} 38; X86-NEXT: jne LBB0_1 39; X86-NEXT: ## %bb.2: ## %bb1 40; X86-NEXT: xorl %eax, %eax 41; X86-NEXT: retl 42; X86-NEXT: LBB0_1: ## %bb2 43; X86-NEXT: movl $1, %eax 44; X86-NEXT: retl 45; 46; GISEL-X86-LABEL: icmp_eq_2: 47; GISEL-X86: ## %bb.0: 48; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax 49; GISEL-X86-NEXT: cmpl %eax, {{[0-9]+}}(%esp) 50; GISEL-X86-NEXT: sete %al 51; GISEL-X86-NEXT: testb $1, %al 52; GISEL-X86-NEXT: je LBB0_1 53; GISEL-X86-NEXT: ## %bb.2: ## %bb1 54; GISEL-X86-NEXT: xorl %eax, %eax 55; GISEL-X86-NEXT: retl 56; GISEL-X86-NEXT: LBB0_1: ## %bb2 57; GISEL-X86-NEXT: movl $1, %eax 58; GISEL-X86-NEXT: retl 59 %1 = icmp eq i32 %x, %y 60 br i1 %1, label %bb1, label %bb2 61bb2: 62 ret i32 1 63bb1: 64 ret i32 0 65} 66 67define i32 @icmp_ne_2(i32 %x, i32 %y) { 68; X64-LABEL: icmp_ne_2: 69; X64: ## %bb.0: 70; X64-NEXT: cmpl %esi, %edi 71; X64-NEXT: je LBB1_1 72; X64-NEXT: ## %bb.2: ## %bb1 73; X64-NEXT: xorl %eax, %eax 74; X64-NEXT: retq 75; X64-NEXT: LBB1_1: ## %bb2 76; X64-NEXT: movl $1, %eax 77; X64-NEXT: retq 78; 79; GISEL-X64-LABEL: icmp_ne_2: 80; GISEL-X64: ## %bb.0: 81; GISEL-X64-NEXT: cmpl %esi, %edi 82; GISEL-X64-NEXT: setne %al 83; GISEL-X64-NEXT: testb $1, %al 84; GISEL-X64-NEXT: je LBB1_1 85; GISEL-X64-NEXT: ## %bb.2: ## %bb1 86; GISEL-X64-NEXT: xorl %eax, %eax 87; GISEL-X64-NEXT: retq 88; GISEL-X64-NEXT: LBB1_1: ## %bb2 89; GISEL-X64-NEXT: movl $1, %eax 90; GISEL-X64-NEXT: retq 91; 92; X86-LABEL: icmp_ne_2: 93; X86: ## %bb.0: 94; X86-NEXT: movl {{[0-9]+}}(%esp), %eax 95; X86-NEXT: cmpl {{[0-9]+\(%esp\), %eax|%eax, [0-9]+\(%esp\)}} 96; X86-NEXT: je LBB1_1 97; X86-NEXT: ## %bb.2: ## %bb1 98; X86-NEXT: xorl %eax, %eax 99; X86-NEXT: retl 100; X86-NEXT: LBB1_1: ## %bb2 101; X86-NEXT: movl $1, %eax 102; X86-NEXT: retl 103; 104; GISEL-X86-LABEL: icmp_ne_2: 105; GISEL-X86: ## %bb.0: 106; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax 107; GISEL-X86-NEXT: cmpl %eax, {{[0-9]+}}(%esp) 108; GISEL-X86-NEXT: setne %al 109; GISEL-X86-NEXT: testb $1, %al 110; GISEL-X86-NEXT: je LBB1_1 111; GISEL-X86-NEXT: ## %bb.2: ## %bb1 112; GISEL-X86-NEXT: xorl %eax, %eax 113; GISEL-X86-NEXT: retl 114; GISEL-X86-NEXT: LBB1_1: ## %bb2 115; GISEL-X86-NEXT: movl $1, %eax 116; GISEL-X86-NEXT: retl 117 %1 = icmp ne i32 %x, %y 118 br i1 %1, label %bb1, label %bb2 119bb2: 120 ret i32 1 121bb1: 122 ret i32 0 123} 124 125define i32 @icmp_ugt_2(i32 %x, i32 %y) { 126; X64-LABEL: icmp_ugt_2: 127; X64: ## %bb.0: 128; X64-NEXT: cmpl %esi, %edi 129; X64-NEXT: jbe LBB2_1 130; X64-NEXT: ## %bb.2: ## %bb1 131; X64-NEXT: xorl %eax, %eax 132; X64-NEXT: retq 133; X64-NEXT: LBB2_1: ## %bb2 134; X64-NEXT: movl $1, %eax 135; X64-NEXT: retq 136; 137; GISEL-X64-LABEL: icmp_ugt_2: 138; GISEL-X64: ## %bb.0: 139; GISEL-X64-NEXT: cmpl %esi, %edi 140; GISEL-X64-NEXT: seta %al 141; GISEL-X64-NEXT: testb $1, %al 142; GISEL-X64-NEXT: je LBB2_1 143; GISEL-X64-NEXT: ## %bb.2: ## %bb1 144; GISEL-X64-NEXT: xorl %eax, %eax 145; GISEL-X64-NEXT: retq 146; GISEL-X64-NEXT: LBB2_1: ## %bb2 147; GISEL-X64-NEXT: movl $1, %eax 148; GISEL-X64-NEXT: retq 149; 150; X86-LABEL: icmp_ugt_2: 151; X86: ## %bb.0: 152; X86-NEXT: movl {{[0-9]+}}(%esp), %eax 153; X86-NEXT: cmpl {{[0-9]+\(%esp\), %eax|%eax, [0-9]+\(%esp\)}} 154; X86-NEXT: jbe LBB2_1 155; X86-NEXT: ## %bb.2: ## %bb1 156; X86-NEXT: xorl %eax, %eax 157; X86-NEXT: retl 158; X86-NEXT: LBB2_1: ## %bb2 159; X86-NEXT: movl $1, %eax 160; X86-NEXT: retl 161; 162; GISEL-X86-LABEL: icmp_ugt_2: 163; GISEL-X86: ## %bb.0: 164; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax 165; GISEL-X86-NEXT: cmpl %eax, {{[0-9]+}}(%esp) 166; GISEL-X86-NEXT: seta %al 167; GISEL-X86-NEXT: testb $1, %al 168; GISEL-X86-NEXT: je LBB2_1 169; GISEL-X86-NEXT: ## %bb.2: ## %bb1 170; GISEL-X86-NEXT: xorl %eax, %eax 171; GISEL-X86-NEXT: retl 172; GISEL-X86-NEXT: LBB2_1: ## %bb2 173; GISEL-X86-NEXT: movl $1, %eax 174; GISEL-X86-NEXT: retl 175 %1 = icmp ugt i32 %x, %y 176 br i1 %1, label %bb1, label %bb2 177bb2: 178 ret i32 1 179bb1: 180 ret i32 0 181} 182 183define i32 @icmp_uge_2(i32 %x, i32 %y) { 184; X64-LABEL: icmp_uge_2: 185; X64: ## %bb.0: 186; X64-NEXT: cmpl %esi, %edi 187; X64-NEXT: jb LBB3_1 188; X64-NEXT: ## %bb.2: ## %bb1 189; X64-NEXT: xorl %eax, %eax 190; X64-NEXT: retq 191; X64-NEXT: LBB3_1: ## %bb2 192; X64-NEXT: movl $1, %eax 193; X64-NEXT: retq 194; 195; GISEL-X64-LABEL: icmp_uge_2: 196; GISEL-X64: ## %bb.0: 197; GISEL-X64-NEXT: cmpl %esi, %edi 198; GISEL-X64-NEXT: setae %al 199; GISEL-X64-NEXT: testb $1, %al 200; GISEL-X64-NEXT: je LBB3_1 201; GISEL-X64-NEXT: ## %bb.2: ## %bb1 202; GISEL-X64-NEXT: xorl %eax, %eax 203; GISEL-X64-NEXT: retq 204; GISEL-X64-NEXT: LBB3_1: ## %bb2 205; GISEL-X64-NEXT: movl $1, %eax 206; GISEL-X64-NEXT: retq 207; 208; X86-LABEL: icmp_uge_2: 209; X86: ## %bb.0: 210; X86-NEXT: movl {{[0-9]+}}(%esp), %eax 211; X86-NEXT: cmpl {{[0-9]+\(%esp\), %eax|%eax, [0-9]+\(%esp\)}} 212; X86-NEXT: jb LBB3_1 213; X86-NEXT: ## %bb.2: ## %bb1 214; X86-NEXT: xorl %eax, %eax 215; X86-NEXT: retl 216; X86-NEXT: LBB3_1: ## %bb2 217; X86-NEXT: movl $1, %eax 218; X86-NEXT: retl 219; 220; GISEL-X86-LABEL: icmp_uge_2: 221; GISEL-X86: ## %bb.0: 222; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax 223; GISEL-X86-NEXT: cmpl %eax, {{[0-9]+}}(%esp) 224; GISEL-X86-NEXT: setae %al 225; GISEL-X86-NEXT: testb $1, %al 226; GISEL-X86-NEXT: je LBB3_1 227; GISEL-X86-NEXT: ## %bb.2: ## %bb1 228; GISEL-X86-NEXT: xorl %eax, %eax 229; GISEL-X86-NEXT: retl 230; GISEL-X86-NEXT: LBB3_1: ## %bb2 231; GISEL-X86-NEXT: movl $1, %eax 232; GISEL-X86-NEXT: retl 233 %1 = icmp uge i32 %x, %y 234 br i1 %1, label %bb1, label %bb2 235bb2: 236 ret i32 1 237bb1: 238 ret i32 0 239} 240 241define i32 @icmp_ult_2(i32 %x, i32 %y) { 242; X64-LABEL: icmp_ult_2: 243; X64: ## %bb.0: 244; X64-NEXT: cmpl %esi, %edi 245; X64-NEXT: jae LBB4_1 246; X64-NEXT: ## %bb.2: ## %bb1 247; X64-NEXT: xorl %eax, %eax 248; X64-NEXT: retq 249; X64-NEXT: LBB4_1: ## %bb2 250; X64-NEXT: movl $1, %eax 251; X64-NEXT: retq 252; 253; GISEL-X64-LABEL: icmp_ult_2: 254; GISEL-X64: ## %bb.0: 255; GISEL-X64-NEXT: cmpl %esi, %edi 256; GISEL-X64-NEXT: setb %al 257; GISEL-X64-NEXT: testb $1, %al 258; GISEL-X64-NEXT: je LBB4_1 259; GISEL-X64-NEXT: ## %bb.2: ## %bb1 260; GISEL-X64-NEXT: xorl %eax, %eax 261; GISEL-X64-NEXT: retq 262; GISEL-X64-NEXT: LBB4_1: ## %bb2 263; GISEL-X64-NEXT: movl $1, %eax 264; GISEL-X64-NEXT: retq 265; 266; X86-LABEL: icmp_ult_2: 267; X86: ## %bb.0: 268; X86-NEXT: movl {{[0-9]+}}(%esp), %eax 269; X86-NEXT: cmpl {{[0-9]+\(%esp\), %eax|%eax, [0-9]+\(%esp\)}} 270; X86-NEXT: jae LBB4_1 271; X86-NEXT: ## %bb.2: ## %bb1 272; X86-NEXT: xorl %eax, %eax 273; X86-NEXT: retl 274; X86-NEXT: LBB4_1: ## %bb2 275; X86-NEXT: movl $1, %eax 276; X86-NEXT: retl 277; 278; GISEL-X86-LABEL: icmp_ult_2: 279; GISEL-X86: ## %bb.0: 280; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax 281; GISEL-X86-NEXT: cmpl %eax, {{[0-9]+}}(%esp) 282; GISEL-X86-NEXT: setb %al 283; GISEL-X86-NEXT: testb $1, %al 284; GISEL-X86-NEXT: je LBB4_1 285; GISEL-X86-NEXT: ## %bb.2: ## %bb1 286; GISEL-X86-NEXT: xorl %eax, %eax 287; GISEL-X86-NEXT: retl 288; GISEL-X86-NEXT: LBB4_1: ## %bb2 289; GISEL-X86-NEXT: movl $1, %eax 290; GISEL-X86-NEXT: retl 291 %1 = icmp ult i32 %x, %y 292 br i1 %1, label %bb1, label %bb2 293bb2: 294 ret i32 1 295bb1: 296 ret i32 0 297} 298 299define i32 @icmp_ule_2(i32 %x, i32 %y) { 300; X64-LABEL: icmp_ule_2: 301; X64: ## %bb.0: 302; X64-NEXT: cmpl %esi, %edi 303; X64-NEXT: ja LBB5_1 304; X64-NEXT: ## %bb.2: ## %bb1 305; X64-NEXT: xorl %eax, %eax 306; X64-NEXT: retq 307; X64-NEXT: LBB5_1: ## %bb2 308; X64-NEXT: movl $1, %eax 309; X64-NEXT: retq 310; 311; GISEL-X64-LABEL: icmp_ule_2: 312; GISEL-X64: ## %bb.0: 313; GISEL-X64-NEXT: cmpl %esi, %edi 314; GISEL-X64-NEXT: setbe %al 315; GISEL-X64-NEXT: testb $1, %al 316; GISEL-X64-NEXT: je LBB5_1 317; GISEL-X64-NEXT: ## %bb.2: ## %bb1 318; GISEL-X64-NEXT: xorl %eax, %eax 319; GISEL-X64-NEXT: retq 320; GISEL-X64-NEXT: LBB5_1: ## %bb2 321; GISEL-X64-NEXT: movl $1, %eax 322; GISEL-X64-NEXT: retq 323; 324; X86-LABEL: icmp_ule_2: 325; X86: ## %bb.0: 326; X86-NEXT: movl {{[0-9]+}}(%esp), %eax 327; X86-NEXT: cmpl {{[0-9]+\(%esp\), %eax|%eax, [0-9]+\(%esp\)}} 328; X86-NEXT: ja LBB5_1 329; X86-NEXT: ## %bb.2: ## %bb1 330; X86-NEXT: xorl %eax, %eax 331; X86-NEXT: retl 332; X86-NEXT: LBB5_1: ## %bb2 333; X86-NEXT: movl $1, %eax 334; X86-NEXT: retl 335; 336; GISEL-X86-LABEL: icmp_ule_2: 337; GISEL-X86: ## %bb.0: 338; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax 339; GISEL-X86-NEXT: cmpl %eax, {{[0-9]+}}(%esp) 340; GISEL-X86-NEXT: setbe %al 341; GISEL-X86-NEXT: testb $1, %al 342; GISEL-X86-NEXT: je LBB5_1 343; GISEL-X86-NEXT: ## %bb.2: ## %bb1 344; GISEL-X86-NEXT: xorl %eax, %eax 345; GISEL-X86-NEXT: retl 346; GISEL-X86-NEXT: LBB5_1: ## %bb2 347; GISEL-X86-NEXT: movl $1, %eax 348; GISEL-X86-NEXT: retl 349 %1 = icmp ule i32 %x, %y 350 br i1 %1, label %bb1, label %bb2 351bb2: 352 ret i32 1 353bb1: 354 ret i32 0 355} 356 357define i32 @icmp_sgt_2(i32 %x, i32 %y) { 358; X64-LABEL: icmp_sgt_2: 359; X64: ## %bb.0: 360; X64-NEXT: cmpl %esi, %edi 361; X64-NEXT: jle LBB6_1 362; X64-NEXT: ## %bb.2: ## %bb1 363; X64-NEXT: xorl %eax, %eax 364; X64-NEXT: retq 365; X64-NEXT: LBB6_1: ## %bb2 366; X64-NEXT: movl $1, %eax 367; X64-NEXT: retq 368; 369; GISEL-X64-LABEL: icmp_sgt_2: 370; GISEL-X64: ## %bb.0: 371; GISEL-X64-NEXT: cmpl %esi, %edi 372; GISEL-X64-NEXT: setg %al 373; GISEL-X64-NEXT: testb $1, %al 374; GISEL-X64-NEXT: je LBB6_1 375; GISEL-X64-NEXT: ## %bb.2: ## %bb1 376; GISEL-X64-NEXT: xorl %eax, %eax 377; GISEL-X64-NEXT: retq 378; GISEL-X64-NEXT: LBB6_1: ## %bb2 379; GISEL-X64-NEXT: movl $1, %eax 380; GISEL-X64-NEXT: retq 381; 382; X86-LABEL: icmp_sgt_2: 383; X86: ## %bb.0: 384; X86-NEXT: movl {{[0-9]+}}(%esp), %eax 385; X86-NEXT: cmpl {{[0-9]+\(%esp\), %eax|%eax, [0-9]+\(%esp\)}} 386; X86-NEXT: jle LBB6_1 387; X86-NEXT: ## %bb.2: ## %bb1 388; X86-NEXT: xorl %eax, %eax 389; X86-NEXT: retl 390; X86-NEXT: LBB6_1: ## %bb2 391; X86-NEXT: movl $1, %eax 392; X86-NEXT: retl 393; 394; GISEL-X86-LABEL: icmp_sgt_2: 395; GISEL-X86: ## %bb.0: 396; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax 397; GISEL-X86-NEXT: cmpl %eax, {{[0-9]+}}(%esp) 398; GISEL-X86-NEXT: setg %al 399; GISEL-X86-NEXT: testb $1, %al 400; GISEL-X86-NEXT: je LBB6_1 401; GISEL-X86-NEXT: ## %bb.2: ## %bb1 402; GISEL-X86-NEXT: xorl %eax, %eax 403; GISEL-X86-NEXT: retl 404; GISEL-X86-NEXT: LBB6_1: ## %bb2 405; GISEL-X86-NEXT: movl $1, %eax 406; GISEL-X86-NEXT: retl 407 %1 = icmp sgt i32 %x, %y 408 br i1 %1, label %bb1, label %bb2 409bb2: 410 ret i32 1 411bb1: 412 ret i32 0 413} 414 415define i32 @icmp_sge_2(i32 %x, i32 %y) { 416; X64-LABEL: icmp_sge_2: 417; X64: ## %bb.0: 418; X64-NEXT: cmpl %esi, %edi 419; X64-NEXT: jl LBB7_1 420; X64-NEXT: ## %bb.2: ## %bb1 421; X64-NEXT: xorl %eax, %eax 422; X64-NEXT: retq 423; X64-NEXT: LBB7_1: ## %bb2 424; X64-NEXT: movl $1, %eax 425; X64-NEXT: retq 426; 427; GISEL-X64-LABEL: icmp_sge_2: 428; GISEL-X64: ## %bb.0: 429; GISEL-X64-NEXT: cmpl %esi, %edi 430; GISEL-X64-NEXT: setge %al 431; GISEL-X64-NEXT: testb $1, %al 432; GISEL-X64-NEXT: je LBB7_1 433; GISEL-X64-NEXT: ## %bb.2: ## %bb1 434; GISEL-X64-NEXT: xorl %eax, %eax 435; GISEL-X64-NEXT: retq 436; GISEL-X64-NEXT: LBB7_1: ## %bb2 437; GISEL-X64-NEXT: movl $1, %eax 438; GISEL-X64-NEXT: retq 439; 440; X86-LABEL: icmp_sge_2: 441; X86: ## %bb.0: 442; X86-NEXT: movl {{[0-9]+}}(%esp), %eax 443; X86-NEXT: cmpl {{[0-9]+\(%esp\), %eax|%eax, [0-9]+\(%esp\)}} 444; X86-NEXT: jl LBB7_1 445; X86-NEXT: ## %bb.2: ## %bb1 446; X86-NEXT: xorl %eax, %eax 447; X86-NEXT: retl 448; X86-NEXT: LBB7_1: ## %bb2 449; X86-NEXT: movl $1, %eax 450; X86-NEXT: retl 451; 452; GISEL-X86-LABEL: icmp_sge_2: 453; GISEL-X86: ## %bb.0: 454; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax 455; GISEL-X86-NEXT: cmpl %eax, {{[0-9]+}}(%esp) 456; GISEL-X86-NEXT: setge %al 457; GISEL-X86-NEXT: testb $1, %al 458; GISEL-X86-NEXT: je LBB7_1 459; GISEL-X86-NEXT: ## %bb.2: ## %bb1 460; GISEL-X86-NEXT: xorl %eax, %eax 461; GISEL-X86-NEXT: retl 462; GISEL-X86-NEXT: LBB7_1: ## %bb2 463; GISEL-X86-NEXT: movl $1, %eax 464; GISEL-X86-NEXT: retl 465 %1 = icmp sge i32 %x, %y 466 br i1 %1, label %bb1, label %bb2 467bb2: 468 ret i32 1 469bb1: 470 ret i32 0 471} 472 473define i32 @icmp_slt_2(i32 %x, i32 %y) { 474; X64-LABEL: icmp_slt_2: 475; X64: ## %bb.0: 476; X64-NEXT: cmpl %esi, %edi 477; X64-NEXT: jge LBB8_1 478; X64-NEXT: ## %bb.2: ## %bb1 479; X64-NEXT: xorl %eax, %eax 480; X64-NEXT: retq 481; X64-NEXT: LBB8_1: ## %bb2 482; X64-NEXT: movl $1, %eax 483; X64-NEXT: retq 484; 485; GISEL-X64-LABEL: icmp_slt_2: 486; GISEL-X64: ## %bb.0: 487; GISEL-X64-NEXT: cmpl %esi, %edi 488; GISEL-X64-NEXT: setl %al 489; GISEL-X64-NEXT: testb $1, %al 490; GISEL-X64-NEXT: je LBB8_1 491; GISEL-X64-NEXT: ## %bb.2: ## %bb1 492; GISEL-X64-NEXT: xorl %eax, %eax 493; GISEL-X64-NEXT: retq 494; GISEL-X64-NEXT: LBB8_1: ## %bb2 495; GISEL-X64-NEXT: movl $1, %eax 496; GISEL-X64-NEXT: retq 497; 498; X86-LABEL: icmp_slt_2: 499; X86: ## %bb.0: 500; X86-NEXT: movl {{[0-9]+}}(%esp), %eax 501; X86-NEXT: cmpl {{[0-9]+\(%esp\), %eax|%eax, [0-9]+\(%esp\)}} 502; X86-NEXT: jge LBB8_1 503; X86-NEXT: ## %bb.2: ## %bb1 504; X86-NEXT: xorl %eax, %eax 505; X86-NEXT: retl 506; X86-NEXT: LBB8_1: ## %bb2 507; X86-NEXT: movl $1, %eax 508; X86-NEXT: retl 509; 510; GISEL-X86-LABEL: icmp_slt_2: 511; GISEL-X86: ## %bb.0: 512; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax 513; GISEL-X86-NEXT: cmpl %eax, {{[0-9]+}}(%esp) 514; GISEL-X86-NEXT: setl %al 515; GISEL-X86-NEXT: testb $1, %al 516; GISEL-X86-NEXT: je LBB8_1 517; GISEL-X86-NEXT: ## %bb.2: ## %bb1 518; GISEL-X86-NEXT: xorl %eax, %eax 519; GISEL-X86-NEXT: retl 520; GISEL-X86-NEXT: LBB8_1: ## %bb2 521; GISEL-X86-NEXT: movl $1, %eax 522; GISEL-X86-NEXT: retl 523 %1 = icmp slt i32 %x, %y 524 br i1 %1, label %bb1, label %bb2 525bb2: 526 ret i32 1 527bb1: 528 ret i32 0 529} 530 531define i32 @icmp_sle_2(i32 %x, i32 %y) { 532; X64-LABEL: icmp_sle_2: 533; X64: ## %bb.0: 534; X64-NEXT: cmpl %esi, %edi 535; X64-NEXT: jg LBB9_1 536; X64-NEXT: ## %bb.2: ## %bb1 537; X64-NEXT: xorl %eax, %eax 538; X64-NEXT: retq 539; X64-NEXT: LBB9_1: ## %bb2 540; X64-NEXT: movl $1, %eax 541; X64-NEXT: retq 542; 543; GISEL-X64-LABEL: icmp_sle_2: 544; GISEL-X64: ## %bb.0: 545; GISEL-X64-NEXT: cmpl %esi, %edi 546; GISEL-X64-NEXT: setle %al 547; GISEL-X64-NEXT: testb $1, %al 548; GISEL-X64-NEXT: je LBB9_1 549; GISEL-X64-NEXT: ## %bb.2: ## %bb1 550; GISEL-X64-NEXT: xorl %eax, %eax 551; GISEL-X64-NEXT: retq 552; GISEL-X64-NEXT: LBB9_1: ## %bb2 553; GISEL-X64-NEXT: movl $1, %eax 554; GISEL-X64-NEXT: retq 555; 556; X86-LABEL: icmp_sle_2: 557; X86: ## %bb.0: 558; X86-NEXT: movl {{[0-9]+}}(%esp), %eax 559; X86-NEXT: cmpl {{[0-9]+\(%esp\), %eax|%eax, [0-9]+\(%esp\)}} 560; X86-NEXT: jg LBB9_1 561; X86-NEXT: ## %bb.2: ## %bb1 562; X86-NEXT: xorl %eax, %eax 563; X86-NEXT: retl 564; X86-NEXT: LBB9_1: ## %bb2 565; X86-NEXT: movl $1, %eax 566; X86-NEXT: retl 567; 568; GISEL-X86-LABEL: icmp_sle_2: 569; GISEL-X86: ## %bb.0: 570; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax 571; GISEL-X86-NEXT: cmpl %eax, {{[0-9]+}}(%esp) 572; GISEL-X86-NEXT: setle %al 573; GISEL-X86-NEXT: testb $1, %al 574; GISEL-X86-NEXT: je LBB9_1 575; GISEL-X86-NEXT: ## %bb.2: ## %bb1 576; GISEL-X86-NEXT: xorl %eax, %eax 577; GISEL-X86-NEXT: retl 578; GISEL-X86-NEXT: LBB9_1: ## %bb2 579; GISEL-X86-NEXT: movl $1, %eax 580; GISEL-X86-NEXT: retl 581 %1 = icmp sle i32 %x, %y 582 br i1 %1, label %bb1, label %bb2 583bb2: 584 ret i32 1 585bb1: 586 ret i32 0 587} 588 589define i32 @icmp_eq(i32 %x) { 590; SDAG-LABEL: icmp_eq: 591; SDAG: ## %bb.0: 592; SDAG-NEXT: movb $1, %al 593; SDAG-NEXT: testb %al, %al 594; SDAG-NEXT: je LBB10_1 595; SDAG-NEXT: ## %bb.2: ## %bb1 596; SDAG-NEXT: xorl %eax, %eax 597; SDAG-NEXT: ret{{q|l}} 598; SDAG-NEXT: LBB10_1: ## %bb2 599; SDAG-NEXT: movl $1, %eax 600; SDAG-NEXT: ret{{q|l}} 601; 602; FASTISEL-LABEL: icmp_eq: 603; FASTISEL: ## %bb.0: 604; FASTISEL-NEXT: xorl %eax, %eax 605; FASTISEL-NEXT: ret{{q|l}} 606; 607; GISEL-X64-LABEL: icmp_eq: 608; GISEL-X64: ## %bb.0: 609; GISEL-X64-NEXT: cmpl %edi, %edi 610; GISEL-X64-NEXT: sete %al 611; GISEL-X64-NEXT: testb $1, %al 612; GISEL-X64-NEXT: je LBB10_1 613; GISEL-X64-NEXT: ## %bb.2: ## %bb1 614; GISEL-X64-NEXT: xorl %eax, %eax 615; GISEL-X64-NEXT: retq 616; GISEL-X64-NEXT: LBB10_1: ## %bb2 617; GISEL-X64-NEXT: movl $1, %eax 618; GISEL-X64-NEXT: retq 619; 620; GISEL-X86-LABEL: icmp_eq: 621; GISEL-X86: ## %bb.0: 622; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax 623; GISEL-X86-NEXT: cmpl %eax, %eax 624; GISEL-X86-NEXT: sete %al 625; GISEL-X86-NEXT: testb $1, %al 626; GISEL-X86-NEXT: je LBB10_1 627; GISEL-X86-NEXT: ## %bb.2: ## %bb1 628; GISEL-X86-NEXT: xorl %eax, %eax 629; GISEL-X86-NEXT: retl 630; GISEL-X86-NEXT: LBB10_1: ## %bb2 631; GISEL-X86-NEXT: movl $1, %eax 632; GISEL-X86-NEXT: retl 633 %1 = icmp eq i32 %x, %x 634 br i1 %1, label %bb1, label %bb2 635bb2: 636 ret i32 1 637bb1: 638 ret i32 0 639} 640 641define i32 @icmp_ne(i32 %x) { 642; SDAG-LABEL: icmp_ne: 643; SDAG: ## %bb.0: 644; SDAG-NEXT: xorl %eax, %eax 645; SDAG-NEXT: testb %al, %al 646; SDAG-NEXT: je LBB11_1 647; SDAG-NEXT: ## %bb.2: ## %bb1 648; SDAG-NEXT: xorl %eax, %eax 649; SDAG-NEXT: ret{{q|l}} 650; SDAG-NEXT: LBB11_1: ## %bb2 651; SDAG-NEXT: movl $1, %eax 652; SDAG-NEXT: ret{{q|l}} 653; 654; FASTISEL-LABEL: icmp_ne: 655; FASTISEL: ## %bb.0: 656; FASTISEL-NEXT: movl $1, %eax 657; FASTISEL-NEXT: ret{{q|l}} 658; 659; GISEL-X64-LABEL: icmp_ne: 660; GISEL-X64: ## %bb.0: 661; GISEL-X64-NEXT: cmpl %edi, %edi 662; GISEL-X64-NEXT: setne %al 663; GISEL-X64-NEXT: testb $1, %al 664; GISEL-X64-NEXT: je LBB11_1 665; GISEL-X64-NEXT: ## %bb.2: ## %bb1 666; GISEL-X64-NEXT: xorl %eax, %eax 667; GISEL-X64-NEXT: retq 668; GISEL-X64-NEXT: LBB11_1: ## %bb2 669; GISEL-X64-NEXT: movl $1, %eax 670; GISEL-X64-NEXT: retq 671; 672; GISEL-X86-LABEL: icmp_ne: 673; GISEL-X86: ## %bb.0: 674; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax 675; GISEL-X86-NEXT: cmpl %eax, %eax 676; GISEL-X86-NEXT: setne %al 677; GISEL-X86-NEXT: testb $1, %al 678; GISEL-X86-NEXT: je LBB11_1 679; GISEL-X86-NEXT: ## %bb.2: ## %bb1 680; GISEL-X86-NEXT: xorl %eax, %eax 681; GISEL-X86-NEXT: retl 682; GISEL-X86-NEXT: LBB11_1: ## %bb2 683; GISEL-X86-NEXT: movl $1, %eax 684; GISEL-X86-NEXT: retl 685 %1 = icmp ne i32 %x, %x 686 br i1 %1, label %bb1, label %bb2 687bb2: 688 ret i32 1 689bb1: 690 ret i32 0 691} 692 693define i32 @icmp_ugt(i32 %x) { 694; SDAG-LABEL: icmp_ugt: 695; SDAG: ## %bb.0: 696; SDAG-NEXT: xorl %eax, %eax 697; SDAG-NEXT: testb %al, %al 698; SDAG-NEXT: je LBB12_1 699; SDAG-NEXT: ## %bb.2: ## %bb1 700; SDAG-NEXT: xorl %eax, %eax 701; SDAG-NEXT: ret{{q|l}} 702; SDAG-NEXT: LBB12_1: ## %bb2 703; SDAG-NEXT: movl $1, %eax 704; SDAG-NEXT: ret{{q|l}} 705; 706; FASTISEL-LABEL: icmp_ugt: 707; FASTISEL: ## %bb.0: 708; FASTISEL-NEXT: movl $1, %eax 709; FASTISEL-NEXT: ret{{q|l}} 710; 711; GISEL-X64-LABEL: icmp_ugt: 712; GISEL-X64: ## %bb.0: 713; GISEL-X64-NEXT: cmpl %edi, %edi 714; GISEL-X64-NEXT: seta %al 715; GISEL-X64-NEXT: testb $1, %al 716; GISEL-X64-NEXT: je LBB12_1 717; GISEL-X64-NEXT: ## %bb.2: ## %bb1 718; GISEL-X64-NEXT: xorl %eax, %eax 719; GISEL-X64-NEXT: retq 720; GISEL-X64-NEXT: LBB12_1: ## %bb2 721; GISEL-X64-NEXT: movl $1, %eax 722; GISEL-X64-NEXT: retq 723; 724; GISEL-X86-LABEL: icmp_ugt: 725; GISEL-X86: ## %bb.0: 726; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax 727; GISEL-X86-NEXT: cmpl %eax, %eax 728; GISEL-X86-NEXT: seta %al 729; GISEL-X86-NEXT: testb $1, %al 730; GISEL-X86-NEXT: je LBB12_1 731; GISEL-X86-NEXT: ## %bb.2: ## %bb1 732; GISEL-X86-NEXT: xorl %eax, %eax 733; GISEL-X86-NEXT: retl 734; GISEL-X86-NEXT: LBB12_1: ## %bb2 735; GISEL-X86-NEXT: movl $1, %eax 736; GISEL-X86-NEXT: retl 737 %1 = icmp ugt i32 %x, %x 738 br i1 %1, label %bb1, label %bb2 739bb2: 740 ret i32 1 741bb1: 742 ret i32 0 743} 744 745define i32 @icmp_uge(i32 %x) { 746; SDAG-LABEL: icmp_uge: 747; SDAG: ## %bb.0: 748; SDAG-NEXT: movb $1, %al 749; SDAG-NEXT: testb %al, %al 750; SDAG-NEXT: je LBB13_1 751; SDAG-NEXT: ## %bb.2: ## %bb1 752; SDAG-NEXT: xorl %eax, %eax 753; SDAG-NEXT: ret{{q|l}} 754; SDAG-NEXT: LBB13_1: ## %bb2 755; SDAG-NEXT: movl $1, %eax 756; SDAG-NEXT: ret{{q|l}} 757; 758; FASTISEL-X64-LABEL: icmp_uge: 759; FASTISEL-X64: ## %bb.0: 760; FASTISEL-X64-NEXT: xorl %eax, %eax 761; FASTISEL-X64-NEXT: retq 762; 763; GISEL-X64-LABEL: icmp_uge: 764; GISEL-X64: ## %bb.0: 765; GISEL-X64-NEXT: cmpl %edi, %edi 766; GISEL-X64-NEXT: setae %al 767; GISEL-X64-NEXT: testb $1, %al 768; GISEL-X64-NEXT: je LBB13_1 769; GISEL-X64-NEXT: ## %bb.2: ## %bb1 770; GISEL-X64-NEXT: xorl %eax, %eax 771; GISEL-X64-NEXT: retq 772; GISEL-X64-NEXT: LBB13_1: ## %bb2 773; GISEL-X64-NEXT: movl $1, %eax 774; GISEL-X64-NEXT: retq 775; 776; GISEL-X86-LABEL: icmp_uge: 777; GISEL-X86: ## %bb.0: 778; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax 779; GISEL-X86-NEXT: cmpl %eax, %eax 780; GISEL-X86-NEXT: setae %al 781; GISEL-X86-NEXT: testb $1, %al 782; GISEL-X86-NEXT: je LBB13_1 783; GISEL-X86-NEXT: ## %bb.2: ## %bb1 784; GISEL-X86-NEXT: xorl %eax, %eax 785; GISEL-X86-NEXT: retl 786; GISEL-X86-NEXT: LBB13_1: ## %bb2 787; GISEL-X86-NEXT: movl $1, %eax 788; GISEL-X86-NEXT: retl 789 %1 = icmp uge i32 %x, %x 790 br i1 %1, label %bb1, label %bb2 791bb2: 792 ret i32 1 793bb1: 794 ret i32 0 795} 796 797define i32 @icmp_ult(i32 %x) { 798; SDAG-LABEL: icmp_ult: 799; SDAG: ## %bb.0: 800; SDAG-NEXT: xorl %eax, %eax 801; SDAG-NEXT: testb %al, %al 802; SDAG-NEXT: je LBB14_1 803; SDAG-NEXT: ## %bb.2: ## %bb1 804; SDAG-NEXT: xorl %eax, %eax 805; SDAG-NEXT: ret{{q|l}} 806; SDAG-NEXT: LBB14_1: ## %bb2 807; SDAG-NEXT: movl $1, %eax 808; SDAG-NEXT: ret{{q|l}} 809; 810; FASTISEL-X64-LABEL: icmp_ult: 811; FASTISEL-X64: ## %bb.0: 812; FASTISEL-X64-NEXT: movl $1, %eax 813; FASTISEL-X64-NEXT: ret{{q|l}} 814; 815; GISEL-X64-LABEL: icmp_ult: 816; GISEL-X64: ## %bb.0: 817; GISEL-X64-NEXT: cmpl %edi, %edi 818; GISEL-X64-NEXT: setb %al 819; GISEL-X64-NEXT: testb $1, %al 820; GISEL-X64-NEXT: je LBB14_1 821; GISEL-X64-NEXT: ## %bb.2: ## %bb1 822; GISEL-X64-NEXT: xorl %eax, %eax 823; GISEL-X64-NEXT: retq 824; GISEL-X64-NEXT: LBB14_1: ## %bb2 825; GISEL-X64-NEXT: movl $1, %eax 826; GISEL-X64-NEXT: retq 827; 828; GISEL-X86-LABEL: icmp_ult: 829; GISEL-X86: ## %bb.0: 830; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax 831; GISEL-X86-NEXT: cmpl %eax, %eax 832; GISEL-X86-NEXT: setb %al 833; GISEL-X86-NEXT: testb $1, %al 834; GISEL-X86-NEXT: je LBB14_1 835; GISEL-X86-NEXT: ## %bb.2: ## %bb1 836; GISEL-X86-NEXT: xorl %eax, %eax 837; GISEL-X86-NEXT: retl 838; GISEL-X86-NEXT: LBB14_1: ## %bb2 839; GISEL-X86-NEXT: movl $1, %eax 840; GISEL-X86-NEXT: retl 841 %1 = icmp ult i32 %x, %x 842 br i1 %1, label %bb1, label %bb2 843bb2: 844 ret i32 1 845bb1: 846 ret i32 0 847} 848 849define i32 @icmp_ule(i32 %x) { 850; SDAG-LABEL: icmp_ule: 851; SDAG: ## %bb.0: 852; SDAG-NEXT: movb $1, %al 853; SDAG-NEXT: testb %al, %al 854; SDAG-NEXT: je LBB15_1 855; SDAG-NEXT: ## %bb.2: ## %bb1 856; SDAG-NEXT: xorl %eax, %eax 857; SDAG-NEXT: ret{{q|l}} 858; SDAG-NEXT: LBB15_1: ## %bb2 859; SDAG-NEXT: movl $1, %eax 860; SDAG-NEXT: ret{{q|l}} 861; 862; FASTISEL-LABEL: icmp_ule: 863; FASTISEL: ## %bb.0: 864; FASTISEL-NEXT: xorl %eax, %eax 865; FASTISEL-NEXT: ret{{q|l}} 866; 867; GISEL-X64-LABEL: icmp_ule: 868; GISEL-X64: ## %bb.0: 869; GISEL-X64-NEXT: cmpl %edi, %edi 870; GISEL-X64-NEXT: setbe %al 871; GISEL-X64-NEXT: testb $1, %al 872; GISEL-X64-NEXT: je LBB15_1 873; GISEL-X64-NEXT: ## %bb.2: ## %bb1 874; GISEL-X64-NEXT: xorl %eax, %eax 875; GISEL-X64-NEXT: retq 876; GISEL-X64-NEXT: LBB15_1: ## %bb2 877; GISEL-X64-NEXT: movl $1, %eax 878; GISEL-X64-NEXT: retq 879; 880; GISEL-X86-LABEL: icmp_ule: 881; GISEL-X86: ## %bb.0: 882; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax 883; GISEL-X86-NEXT: cmpl %eax, %eax 884; GISEL-X86-NEXT: setbe %al 885; GISEL-X86-NEXT: testb $1, %al 886; GISEL-X86-NEXT: je LBB15_1 887; GISEL-X86-NEXT: ## %bb.2: ## %bb1 888; GISEL-X86-NEXT: xorl %eax, %eax 889; GISEL-X86-NEXT: retl 890; GISEL-X86-NEXT: LBB15_1: ## %bb2 891; GISEL-X86-NEXT: movl $1, %eax 892; GISEL-X86-NEXT: retl 893 %1 = icmp ule i32 %x, %x 894 br i1 %1, label %bb1, label %bb2 895bb2: 896 ret i32 1 897bb1: 898 ret i32 0 899} 900 901define i32 @icmp_sgt(i32 %x) { 902; SDAG-LABEL: icmp_sgt: 903; SDAG: ## %bb.0: 904; SDAG-NEXT: xorl %eax, %eax 905; SDAG-NEXT: testb %al, %al 906; SDAG-NEXT: je LBB16_1 907; SDAG-NEXT: ## %bb.2: ## %bb1 908; SDAG-NEXT: xorl %eax, %eax 909; SDAG-NEXT: ret{{q|l}} 910; SDAG-NEXT: LBB16_1: ## %bb2 911; SDAG-NEXT: movl $1, %eax 912; SDAG-NEXT: ret{{q|l}} 913; 914; FASTISEL-LABEL: icmp_sgt: 915; FASTISEL: ## %bb.0: 916; FASTISEL-NEXT: movl $1, %eax 917; FASTISEL-NEXT: ret{{q|l}} 918; 919; GISEL-X64-LABEL: icmp_sgt: 920; GISEL-X64: ## %bb.0: 921; GISEL-X64-NEXT: cmpl %edi, %edi 922; GISEL-X64-NEXT: setg %al 923; GISEL-X64-NEXT: testb $1, %al 924; GISEL-X64-NEXT: je LBB16_1 925; GISEL-X64-NEXT: ## %bb.2: ## %bb1 926; GISEL-X64-NEXT: xorl %eax, %eax 927; GISEL-X64-NEXT: retq 928; GISEL-X64-NEXT: LBB16_1: ## %bb2 929; GISEL-X64-NEXT: movl $1, %eax 930; GISEL-X64-NEXT: retq 931; 932; GISEL-X86-LABEL: icmp_sgt: 933; GISEL-X86: ## %bb.0: 934; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax 935; GISEL-X86-NEXT: cmpl %eax, %eax 936; GISEL-X86-NEXT: setg %al 937; GISEL-X86-NEXT: testb $1, %al 938; GISEL-X86-NEXT: je LBB16_1 939; GISEL-X86-NEXT: ## %bb.2: ## %bb1 940; GISEL-X86-NEXT: xorl %eax, %eax 941; GISEL-X86-NEXT: retl 942; GISEL-X86-NEXT: LBB16_1: ## %bb2 943; GISEL-X86-NEXT: movl $1, %eax 944; GISEL-X86-NEXT: retl 945 %1 = icmp sgt i32 %x, %x 946 br i1 %1, label %bb1, label %bb2 947bb2: 948 ret i32 1 949bb1: 950 ret i32 0 951} 952 953define i32 @icmp_sge(i32 %x) { 954; SDAG-LABEL: icmp_sge: 955; SDAG: ## %bb.0: 956; SDAG-NEXT: movb $1, %al 957; SDAG-NEXT: testb %al, %al 958; SDAG-NEXT: je LBB17_1 959; SDAG-NEXT: ## %bb.2: ## %bb1 960; SDAG-NEXT: xorl %eax, %eax 961; SDAG-NEXT: ret{{q|l}} 962; SDAG-NEXT: LBB17_1: ## %bb2 963; SDAG-NEXT: movl $1, %eax 964; SDAG-NEXT: ret{{q|l}} 965; 966; FASTISEL-LABEL: icmp_sge: 967; FASTISEL: ## %bb.0: 968; FASTISEL-NEXT: xorl %eax, %eax 969; FASTISEL-NEXT: ret{{q|l}} 970; 971; GISEL-X64-LABEL: icmp_sge: 972; GISEL-X64: ## %bb.0: 973; GISEL-X64-NEXT: cmpl %edi, %edi 974; GISEL-X64-NEXT: setge %al 975; GISEL-X64-NEXT: testb $1, %al 976; GISEL-X64-NEXT: je LBB17_1 977; GISEL-X64-NEXT: ## %bb.2: ## %bb1 978; GISEL-X64-NEXT: xorl %eax, %eax 979; GISEL-X64-NEXT: retq 980; GISEL-X64-NEXT: LBB17_1: ## %bb2 981; GISEL-X64-NEXT: movl $1, %eax 982; GISEL-X64-NEXT: retq 983; 984; GISEL-X86-LABEL: icmp_sge: 985; GISEL-X86: ## %bb.0: 986; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax 987; GISEL-X86-NEXT: cmpl %eax, %eax 988; GISEL-X86-NEXT: setge %al 989; GISEL-X86-NEXT: testb $1, %al 990; GISEL-X86-NEXT: je LBB17_1 991; GISEL-X86-NEXT: ## %bb.2: ## %bb1 992; GISEL-X86-NEXT: xorl %eax, %eax 993; GISEL-X86-NEXT: retl 994; GISEL-X86-NEXT: LBB17_1: ## %bb2 995; GISEL-X86-NEXT: movl $1, %eax 996; GISEL-X86-NEXT: retl 997 %1 = icmp sge i32 %x, %x 998 br i1 %1, label %bb1, label %bb2 999bb2: 1000 ret i32 1 1001bb1: 1002 ret i32 0 1003} 1004 1005define i32 @icmp_slt(i32 %x) { 1006; SDAG-LABEL: icmp_slt: 1007; SDAG: ## %bb.0: 1008; SDAG-NEXT: xorl %eax, %eax 1009; SDAG-NEXT: testb %al, %al 1010; SDAG-NEXT: je LBB18_1 1011; SDAG-NEXT: ## %bb.2: ## %bb1 1012; SDAG-NEXT: xorl %eax, %eax 1013; SDAG-NEXT: ret{{q|l}} 1014; SDAG-NEXT: LBB18_1: ## %bb2 1015; SDAG-NEXT: movl $1, %eax 1016; SDAG-NEXT: ret{{q|l}} 1017; 1018; FASTISEL-LABEL: icmp_slt: 1019; FASTISEL: ## %bb.0: 1020; FASTISEL-NEXT: movl $1, %eax 1021; FASTISEL-NEXT: ret{{q|l}} 1022; 1023; GISEL-X64-LABEL: icmp_slt: 1024; GISEL-X64: ## %bb.0: 1025; GISEL-X64-NEXT: cmpl %edi, %edi 1026; GISEL-X64-NEXT: setl %al 1027; GISEL-X64-NEXT: testb $1, %al 1028; GISEL-X64-NEXT: je LBB18_1 1029; GISEL-X64-NEXT: ## %bb.2: ## %bb1 1030; GISEL-X64-NEXT: xorl %eax, %eax 1031; GISEL-X64-NEXT: retq 1032; GISEL-X64-NEXT: LBB18_1: ## %bb2 1033; GISEL-X64-NEXT: movl $1, %eax 1034; GISEL-X64-NEXT: retq 1035; 1036; GISEL-X86-LABEL: icmp_slt: 1037; GISEL-X86: ## %bb.0: 1038; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax 1039; GISEL-X86-NEXT: cmpl %eax, %eax 1040; GISEL-X86-NEXT: setl %al 1041; GISEL-X86-NEXT: testb $1, %al 1042; GISEL-X86-NEXT: je LBB18_1 1043; GISEL-X86-NEXT: ## %bb.2: ## %bb1 1044; GISEL-X86-NEXT: xorl %eax, %eax 1045; GISEL-X86-NEXT: retl 1046; GISEL-X86-NEXT: LBB18_1: ## %bb2 1047; GISEL-X86-NEXT: movl $1, %eax 1048; GISEL-X86-NEXT: retl 1049 %1 = icmp slt i32 %x, %x 1050 br i1 %1, label %bb1, label %bb2 1051bb2: 1052 ret i32 1 1053bb1: 1054 ret i32 0 1055} 1056 1057define i32 @icmp_sle(i32 %x) { 1058; SDAG-LABEL: icmp_sle: 1059; SDAG: ## %bb.0: 1060; SDAG-NEXT: movb $1, %al 1061; SDAG-NEXT: testb %al, %al 1062; SDAG-NEXT: je LBB19_1 1063; SDAG-NEXT: ## %bb.2: ## %bb1 1064; SDAG-NEXT: xorl %eax, %eax 1065; SDAG-NEXT: ret{{q|l}} 1066; SDAG-NEXT: LBB19_1: ## %bb2 1067; SDAG-NEXT: movl $1, %eax 1068; SDAG-NEXT: ret{{q|l}} 1069; 1070; FASTISEL-LABEL: icmp_sle: 1071; FASTISEL: ## %bb.0: 1072; FASTISEL-NEXT: xorl %eax, %eax 1073; FASTISEL-NEXT: ret{{q|l}} 1074; 1075; GISEL-X64-LABEL: icmp_sle: 1076; GISEL-X64: ## %bb.0: 1077; GISEL-X64-NEXT: cmpl %edi, %edi 1078; GISEL-X64-NEXT: setle %al 1079; GISEL-X64-NEXT: testb $1, %al 1080; GISEL-X64-NEXT: je LBB19_1 1081; GISEL-X64-NEXT: ## %bb.2: ## %bb1 1082; GISEL-X64-NEXT: xorl %eax, %eax 1083; GISEL-X64-NEXT: retq 1084; GISEL-X64-NEXT: LBB19_1: ## %bb2 1085; GISEL-X64-NEXT: movl $1, %eax 1086; GISEL-X64-NEXT: retq 1087; 1088; GISEL-X86-LABEL: icmp_sle: 1089; GISEL-X86: ## %bb.0: 1090; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax 1091; GISEL-X86-NEXT: cmpl %eax, %eax 1092; GISEL-X86-NEXT: setle %al 1093; GISEL-X86-NEXT: testb $1, %al 1094; GISEL-X86-NEXT: je LBB19_1 1095; GISEL-X86-NEXT: ## %bb.2: ## %bb1 1096; GISEL-X86-NEXT: xorl %eax, %eax 1097; GISEL-X86-NEXT: retl 1098; GISEL-X86-NEXT: LBB19_1: ## %bb2 1099; GISEL-X86-NEXT: movl $1, %eax 1100; GISEL-X86-NEXT: retl 1101 %1 = icmp sle i32 %x, %x 1102 br i1 %1, label %bb1, label %bb2 1103bb2: 1104 ret i32 1 1105bb1: 1106 ret i32 0 1107} 1108