brintos

brintos / llvm-project-archived public Read only

0
0
Text · 7.7 KiB · 7dae049 Raw
341 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc < %s -mtriple=i686-apple-darwin10 -fast-isel -fast-isel-abort=1 | FileCheck %s --check-prefix=X323; RUN: llc < %s -mtriple=x86_64-apple-darwin10 -fast-isel -fast-isel-abort=1 | FileCheck %s --check-prefix=X644 5define i8 @test1(i8 %x) nounwind {6; X32-LABEL: test1:7; X32:       ## %bb.0:8; X32-NEXT:    movzbl {{[0-9]+}}(%esp), %eax9; X32-NEXT:    andb $1, %al10; X32-NEXT:    negb %al11; X32-NEXT:    retl12;13; X64-LABEL: test1:14; X64:       ## %bb.0:15; X64-NEXT:    movl %edi, %eax16; X64-NEXT:    andb $1, %al17; X64-NEXT:    negb %al18; X64-NEXT:    ## kill: def $al killed $al killed $eax19; X64-NEXT:    retq20  %z = trunc i8 %x to i121  %u = sext i1 %z to i822  ret i8 %u23}24 25define i16 @test2(i16 %x) nounwind {26; X32-LABEL: test2:27; X32:       ## %bb.0:28; X32-NEXT:    movzwl {{[0-9]+}}(%esp), %eax29; X32-NEXT:    andb $1, %al30; X32-NEXT:    negb %al31; X32-NEXT:    movsbl %al, %eax32; X32-NEXT:    ## kill: def $ax killed $ax killed $eax33; X32-NEXT:    retl34;35; X64-LABEL: test2:36; X64:       ## %bb.0:37; X64-NEXT:    andb $1, %dil38; X64-NEXT:    negb %dil39; X64-NEXT:    movsbl %dil, %eax40; X64-NEXT:    ## kill: def $ax killed $ax killed $eax41; X64-NEXT:    retq42  %z = trunc i16 %x to i143  %u = sext i1 %z to i1644  ret i16 %u45}46 47define i32 @test3(i32 %x) nounwind {48; X32-LABEL: test3:49; X32:       ## %bb.0:50; X32-NEXT:    movl {{[0-9]+}}(%esp), %eax51; X32-NEXT:    andb $1, %al52; X32-NEXT:    negb %al53; X32-NEXT:    movsbl %al, %eax54; X32-NEXT:    retl55;56; X64-LABEL: test3:57; X64:       ## %bb.0:58; X64-NEXT:    andb $1, %dil59; X64-NEXT:    negb %dil60; X64-NEXT:    movsbl %dil, %eax61; X64-NEXT:    retq62  %z = trunc i32 %x to i163  %u = sext i1 %z to i3264  ret i32 %u65}66 67define i32 @test4(i32 %x) nounwind {68; X32-LABEL: test4:69; X32:       ## %bb.0:70; X32-NEXT:    movl {{[0-9]+}}(%esp), %eax71; X32-NEXT:    andb $1, %al72; X32-NEXT:    negb %al73; X32-NEXT:    movsbl %al, %eax74; X32-NEXT:    retl75;76; X64-LABEL: test4:77; X64:       ## %bb.0:78; X64-NEXT:    andb $1, %dil79; X64-NEXT:    negb %dil80; X64-NEXT:    movsbl %dil, %eax81; X64-NEXT:    retq82  %z = trunc i32 %x to i183  %u = sext i1 %z to i3284  ret i32 %u85}86 87define i8 @test5(i8 %x) nounwind {88; X32-LABEL: test5:89; X32:       ## %bb.0:90; X32-NEXT:    movzbl {{[0-9]+}}(%esp), %eax91; X32-NEXT:    andb $1, %al92; X32-NEXT:    retl93;94; X64-LABEL: test5:95; X64:       ## %bb.0:96; X64-NEXT:    movl %edi, %eax97; X64-NEXT:    andb $1, %al98; X64-NEXT:    ## kill: def $al killed $al killed $eax99; X64-NEXT:    retq100  %z = trunc i8 %x to i1101  %u = zext i1 %z to i8102  ret i8 %u103}104 105define i16 @test6(i16 %x) nounwind {106; X32-LABEL: test6:107; X32:       ## %bb.0:108; X32-NEXT:    movzwl {{[0-9]+}}(%esp), %eax109; X32-NEXT:    andb $1, %al110; X32-NEXT:    movzbl %al, %eax111; X32-NEXT:    ## kill: def $ax killed $ax killed $eax112; X32-NEXT:    retl113;114; X64-LABEL: test6:115; X64:       ## %bb.0:116; X64-NEXT:    andb $1, %dil117; X64-NEXT:    movzbl %dil, %eax118; X64-NEXT:    ## kill: def $ax killed $ax killed $eax119; X64-NEXT:    retq120  %z = trunc i16 %x to i1121  %u = zext i1 %z to i16122  ret i16 %u123}124 125define i32 @test7(i32 %x) nounwind {126; X32-LABEL: test7:127; X32:       ## %bb.0:128; X32-NEXT:    movl {{[0-9]+}}(%esp), %eax129; X32-NEXT:    andb $1, %al130; X32-NEXT:    movzbl %al, %eax131; X32-NEXT:    retl132;133; X64-LABEL: test7:134; X64:       ## %bb.0:135; X64-NEXT:    andb $1, %dil136; X64-NEXT:    movzbl %dil, %eax137; X64-NEXT:    retq138  %z = trunc i32 %x to i1139  %u = zext i1 %z to i32140  ret i32 %u141}142 143define i32 @test8(i32 %x) nounwind {144; X32-LABEL: test8:145; X32:       ## %bb.0:146; X32-NEXT:    movl {{[0-9]+}}(%esp), %eax147; X32-NEXT:    andb $1, %al148; X32-NEXT:    movzbl %al, %eax149; X32-NEXT:    retl150;151; X64-LABEL: test8:152; X64:       ## %bb.0:153; X64-NEXT:    andb $1, %dil154; X64-NEXT:    movzbl %dil, %eax155; X64-NEXT:    retq156  %z = trunc i32 %x to i1157  %u = zext i1 %z to i32158  ret i32 %u159}160 161define i16 @test9(i8 %x) nounwind {162; X32-LABEL: test9:163; X32:       ## %bb.0:164; X32-NEXT:    movsbl {{[0-9]+}}(%esp), %eax165; X32-NEXT:    ## kill: def $ax killed $ax killed $eax166; X32-NEXT:    retl167;168; X64-LABEL: test9:169; X64:       ## %bb.0:170; X64-NEXT:    movsbl %dil, %eax171; X64-NEXT:    ## kill: def $ax killed $ax killed $eax172; X64-NEXT:    retq173  %u = sext i8 %x to i16174  ret i16 %u175}176 177define i32 @test10(i8 %x) nounwind {178; X32-LABEL: test10:179; X32:       ## %bb.0:180; X32-NEXT:    movsbl {{[0-9]+}}(%esp), %eax181; X32-NEXT:    retl182;183; X64-LABEL: test10:184; X64:       ## %bb.0:185; X64-NEXT:    movsbl %dil, %eax186; X64-NEXT:    retq187  %u = sext i8 %x to i32188  ret i32 %u189}190 191define i64 @test11(i8 %x) nounwind {192; X32-LABEL: test11:193; X32:       ## %bb.0:194; X32-NEXT:    movsbl {{[0-9]+}}(%esp), %eax195; X32-NEXT:    movl %eax, %edx196; X32-NEXT:    sarl $31, %edx197; X32-NEXT:    retl198;199; X64-LABEL: test11:200; X64:       ## %bb.0:201; X64-NEXT:    movsbq %dil, %rax202; X64-NEXT:    retq203  %u = sext i8 %x to i64204  ret i64 %u205}206 207define i16 @test12(i8 %x) nounwind {208; X32-LABEL: test12:209; X32:       ## %bb.0:210; X32-NEXT:    movzbl {{[0-9]+}}(%esp), %eax211; X32-NEXT:    ## kill: def $ax killed $ax killed $eax212; X32-NEXT:    retl213;214; X64-LABEL: test12:215; X64:       ## %bb.0:216; X64-NEXT:    movzbl %dil, %eax217; X64-NEXT:    ## kill: def $ax killed $ax killed $eax218; X64-NEXT:    retq219  %u = zext i8 %x to i16220  ret i16 %u221}222 223define i32 @test13(i8 %x) nounwind {224; X32-LABEL: test13:225; X32:       ## %bb.0:226; X32-NEXT:    movzbl {{[0-9]+}}(%esp), %eax227; X32-NEXT:    retl228;229; X64-LABEL: test13:230; X64:       ## %bb.0:231; X64-NEXT:    movzbl %dil, %eax232; X64-NEXT:    retq233  %u = zext i8 %x to i32234  ret i32 %u235}236 237define i64 @test14(i8 %x) nounwind {238; X32-LABEL: test14:239; X32:       ## %bb.0:240; X32-NEXT:    movzbl {{[0-9]+}}(%esp), %eax241; X32-NEXT:    xorl %edx, %edx242; X32-NEXT:    retl243;244; X64-LABEL: test14:245; X64:       ## %bb.0:246; X64-NEXT:    movzbl %dil, %eax247; X64-NEXT:    retq248  %u = zext i8 %x to i64249  ret i64 %u250}251 252define i32 @test15(i16 %x) nounwind {253; X32-LABEL: test15:254; X32:       ## %bb.0:255; X32-NEXT:    movswl {{[0-9]+}}(%esp), %eax256; X32-NEXT:    retl257;258; X64-LABEL: test15:259; X64:       ## %bb.0:260; X64-NEXT:    movswl %di, %eax261; X64-NEXT:    retq262  %u = sext i16 %x to i32263  ret i32 %u264}265 266define i64 @test16(i16 %x) nounwind {267; X32-LABEL: test16:268; X32:       ## %bb.0:269; X32-NEXT:    movswl {{[0-9]+}}(%esp), %eax270; X32-NEXT:    movl %eax, %edx271; X32-NEXT:    sarl $31, %edx272; X32-NEXT:    retl273;274; X64-LABEL: test16:275; X64:       ## %bb.0:276; X64-NEXT:    movswq %di, %rax277; X64-NEXT:    retq278  %u = sext i16 %x to i64279  ret i64 %u280}281 282define i32 @test17(i16 %x) nounwind {283; X32-LABEL: test17:284; X32:       ## %bb.0:285; X32-NEXT:    movzwl {{[0-9]+}}(%esp), %eax286; X32-NEXT:    retl287;288; X64-LABEL: test17:289; X64:       ## %bb.0:290; X64-NEXT:    movzwl %di, %eax291; X64-NEXT:    retq292  %u = zext i16 %x to i32293  ret i32 %u294}295 296define i64 @test18(i16 %x) nounwind {297; X32-LABEL: test18:298; X32:       ## %bb.0:299; X32-NEXT:    movzwl {{[0-9]+}}(%esp), %eax300; X32-NEXT:    xorl %edx, %edx301; X32-NEXT:    retl302;303; X64-LABEL: test18:304; X64:       ## %bb.0:305; X64-NEXT:    movzwl %di, %eax306; X64-NEXT:    retq307  %u = zext i16 %x to i64308  ret i64 %u309}310 311define i64 @test19(i32 %x) nounwind {312; X32-LABEL: test19:313; X32:       ## %bb.0:314; X32-NEXT:    movl {{[0-9]+}}(%esp), %eax315; X32-NEXT:    movl %eax, %edx316; X32-NEXT:    sarl $31, %edx317; X32-NEXT:    retl318;319; X64-LABEL: test19:320; X64:       ## %bb.0:321; X64-NEXT:    movslq %edi, %rax322; X64-NEXT:    retq323  %u = sext i32 %x to i64324  ret i64 %u325}326 327define i64 @test20(i32 %x) nounwind {328; X32-LABEL: test20:329; X32:       ## %bb.0:330; X32-NEXT:    movl {{[0-9]+}}(%esp), %eax331; X32-NEXT:    xorl %edx, %edx332; X32-NEXT:    retl333;334; X64-LABEL: test20:335; X64:       ## %bb.0:336; X64-NEXT:    movl %edi, %eax337; X64-NEXT:    retq338  %u = zext i32 %x to i64339  ret i64 %u340}341