brintos

brintos / llvm-project-archived public Read only

0
0
Text · 9.7 KiB · df8d37d Raw
425 lines · plain
1; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort=1 -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr7 -mattr=-vsx | FileCheck %s --check-prefix=ELF642; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort=1 -mtriple=powerpc64le-unknown-linux-gnu -mattr=+vsx | FileCheck %s --check-prefix=VSX3; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort=1 -mtriple=powerpc-unknown-linux-gnu -mcpu=e500 -mattr=spe | FileCheck %s --check-prefix=SPE4 5declare void @foo()6 7define void @t1a(float %a) nounwind {8entry:9; ELF64-LABEL: @t1a10; SPE-LABEL: @t1a11; VSX-LABEL: @t1a12  %cmp = fcmp oeq float %a, 0.000000e+0013; ELF64: addis14; ELF64: lfs15; ELF64: fcmpu16; VSX: addis17; VSX: lfs18; VSX: fcmpu19; SPE: efscmpeq20  br i1 %cmp, label %if.then, label %if.end21 22if.then:                                          ; preds = %entry23  call void @foo()24  br label %if.end25 26if.end:                                           ; preds = %if.then, %entry27  ret void28}29 30define void @t1b(float %a) nounwind {31entry:32; ELF64-LABEL: @t1b33; SPE-LABEL: @t1b34; VSX-LABEL: @t1b35  %cmp = fcmp oeq float %a, -0.000000e+0036; ELF64: addis37; ELF64: lfs38; ELF64: fcmpu39; VSX: addis40; VSX: lfs41; VSX: fcmpu42; SPE: efscmpeq43  br i1 %cmp, label %if.then, label %if.end44 45if.then:                                          ; preds = %entry46  call void @foo()47  br label %if.end48 49if.end:                                           ; preds = %if.then, %entry50  ret void51}52 53define void @t1c(float %a) nounwind {54entry:55; ELF64-LABEL: @t1c56; SPE-LABEL: @t1c57; VSX-LABEL: @t1c58  %cmp = fcmp oeq float -0.000000e+00, %a59; ELF64: addis60; ELF64: lfs61; ELF64: fcmpu62; VSX: addis63; VSX: lfs64; VSX: fcmpu65; SPE: efscmpeq66  br i1 %cmp, label %if.then, label %if.end67 68if.then:                                          ; preds = %entry69  call void @foo()70  br label %if.end71 72if.end:                                           ; preds = %if.then, %entry73  ret void74}75 76define void @t2a(double %a) nounwind {77entry:78; ELF64-LABEL: @t2a79; SPE-LABEL: @t2a80; VSX-LABEL: @t2a81  %cmp = fcmp oeq double %a, 0.000000e+0082; ELF64: addis83; ELF64: lfd84; ELF64: fcmpu85; VSX: addis86; VSX: lfd87; VSX: xscmpudp88; SPE: efdcmpeq89  br i1 %cmp, label %if.then, label %if.end90 91if.then:                                          ; preds = %entry92  call void @foo()93  br label %if.end94 95if.end:                                           ; preds = %if.then, %entry96  ret void97}98 99define void @t2b(double %a) nounwind {100entry:101; ELF64-LABEL: @t2b102; SPE-LABEL: @t2b103; VSX-LABEL: @t2b104  %cmp = fcmp oeq double %a, -0.000000e+00105; ELF64: addis106; ELF64: lfd107; ELF64: fcmpu108; VSX: addis109; VSX: lfd110; VSX: xscmpudp111; SPE: efdcmpeq112  br i1 %cmp, label %if.then, label %if.end113 114if.then:                                          ; preds = %entry115  call void @foo()116  br label %if.end117 118if.end:                                           ; preds = %if.then, %entry119  ret void120}121 122define void @t2c(double %a) nounwind {123entry:124; ELF64-LABEL: @t2c125; SPE-LABEL: @t2c126; VSX-LABEL: @t2c127  %cmp = fcmp oeq double -0.000000e+00, %a128; ELF64: addis129; ELF64: lfd130; ELF64: fcmpu131; VSX: addis132; VSX: lfd133; VSX: xscmpudp134; SPE: efdcmpeq135  br i1 %cmp, label %if.then, label %if.end136 137if.then:                                          ; preds = %entry138  call void @foo()139  br label %if.end140 141if.end:                                           ; preds = %if.then, %entry142  ret void143}144 145define void @t4(i8 signext %a) nounwind {146entry:147; ELF64-LABEL: @t4148  %cmp = icmp eq i8 %a, -1149; ELF64: extsb150; ELF64: cmpwi151  br i1 %cmp, label %if.then, label %if.end152 153if.then:                                          ; preds = %entry154  call void @foo()155  br label %if.end156 157if.end:                                           ; preds = %if.then, %entry158  ret void159}160 161define void @t5(i8 zeroext %a) nounwind {162entry:163; ELF64-LABEL: @t5164  %cmp = icmp eq i8 %a, 1165; ELF64: extsb166; ELF64: cmpwi167  br i1 %cmp, label %if.then, label %if.end168 169if.then:                                          ; preds = %entry170  call void @foo()171  br label %if.end172 173if.end:                                           ; preds = %if.then, %entry174  ret void175}176 177define void @t5a(i8 zeroext %a) nounwind {178entry:179; ELF64-LABEL: @t5a180  %cmp = icmp eq i8 1, %a181; ELF64: extsb182; ELF64: cmpw183  br i1 %cmp, label %if.then, label %if.end184 185if.then:                                          ; preds = %entry186  call void @foo()187  br label %if.end188 189if.end:                                           ; preds = %if.then, %entry190  ret void191}192 193define void @t6(i16 signext %a) nounwind {194entry:195; ELF64-LABEL: @t6196  %cmp = icmp eq i16 %a, -1197; ELF64: extsh198; ELF64: cmpwi199  br i1 %cmp, label %if.then, label %if.end200 201if.then:                                          ; preds = %entry202  call void @foo()203  br label %if.end204 205if.end:                                           ; preds = %if.then, %entry206  ret void207}208 209define void @t7(i16 zeroext %a) nounwind {210entry:211; ELF64-LABEL: @t7212  %cmp = icmp eq i16 %a, 1213; ELF64: extsh214; ELF64: cmpwi215  br i1 %cmp, label %if.then, label %if.end216 217if.then:                                          ; preds = %entry218  call void @foo()219  br label %if.end220 221if.end:                                           ; preds = %if.then, %entry222  ret void223}224 225define void @t7a(i16 zeroext %a) nounwind {226entry:227; ELF64-LABEL: @t7a228  %cmp = icmp eq i16 1, %a229; ELF64: extsh230; ELF64: cmpw231  br i1 %cmp, label %if.then, label %if.end232 233if.then:                                          ; preds = %entry234  call void @foo()235  br label %if.end236 237if.end:                                           ; preds = %if.then, %entry238  ret void239}240 241define void @t8(i32 %a) nounwind {242entry:243; ELF64-LABEL: @t8244  %cmp = icmp eq i32 %a, -1245; ELF64: cmpwi246  br i1 %cmp, label %if.then, label %if.end247 248if.then:                                          ; preds = %entry249  call void @foo()250  br label %if.end251 252if.end:                                           ; preds = %if.then, %entry253  ret void254}255 256define void @t9(i32 %a) nounwind {257entry:258; ELF64-LABEL: @t9259  %cmp = icmp eq i32 %a, 1260; ELF64: cmpwi261  br i1 %cmp, label %if.then, label %if.end262 263if.then:                                          ; preds = %entry264  call void @foo()265  br label %if.end266 267if.end:                                           ; preds = %if.then, %entry268  ret void269}270 271define void @t10(i32 %a) nounwind {272entry:273; ELF64-LABEL: @t10274  %cmp = icmp eq i32 %a, 384275; ELF64: cmpwi276  br i1 %cmp, label %if.then, label %if.end277 278if.then:                                          ; preds = %entry279  call void @foo()280  br label %if.end281 282if.end:                                           ; preds = %if.then, %entry283  ret void284}285 286define void @t11(i32 %a) nounwind {287entry:288; ELF64-LABEL: @t11289  %cmp = icmp eq i32 %a, 4096290; ELF64: cmpwi291  br i1 %cmp, label %if.then, label %if.end292 293if.then:                                          ; preds = %entry294  call void @foo()295  br label %if.end296 297if.end:                                           ; preds = %if.then, %entry298  ret void299}300 301define void @t11a(i32 %a) nounwind {302entry:303; ELF64-LABEL: @t11a304  %cmp = icmp eq i32 4096, %a305; ELF64: cmpw306  br i1 %cmp, label %if.then, label %if.end307 308if.then:                                          ; preds = %entry309  call void @foo()310  br label %if.end311 312if.end:                                           ; preds = %if.then, %entry313  ret void314}315 316define void @t12(i8 %a) nounwind {317entry:318; ELF64-LABEL: @t12319  %cmp = icmp ugt i8 %a, -113320; ELF64: clrlwi321; ELF64: cmplwi322  br i1 %cmp, label %if.then, label %if.end323 324if.then:                                          ; preds = %entry325  call void @foo()326  br label %if.end327 328if.end:                                           ; preds = %if.then, %entry329  ret void330}331 332define void @t13() nounwind ssp {333entry:334; ELF64-LABEL: @t13335  %cmp = icmp slt i32 -123, -2147483648336; ELF64: li337; ELF64: lis338; ELF64: cmpw339  br i1 %cmp, label %if.then, label %if.end340 341if.then:                                          ; preds = %entry342  ret void343 344if.end:                                           ; preds = %entry345  ret void346}347 348define void @t14(i64 %a) nounwind {349entry:350; ELF64-LABEL: @t14351  %cmp = icmp eq i64 %a, -1352; ELF64: cmpdi353  br i1 %cmp, label %if.then, label %if.end354 355if.then:                                          ; preds = %entry356  call void @foo()357  br label %if.end358 359if.end:                                           ; preds = %if.then, %entry360  ret void361}362 363define void @t15(i64 %a) nounwind {364entry:365; ELF64-LABEL: @t15366  %cmp = icmp eq i64 %a, 1367; ELF64: cmpdi368  br i1 %cmp, label %if.then, label %if.end369 370if.then:                                          ; preds = %entry371  call void @foo()372  br label %if.end373 374if.end:                                           ; preds = %if.then, %entry375  ret void376}377 378define void @t16(i64 %a) nounwind {379entry:380; ELF64-LABEL: @t16381  %cmp = icmp eq i64 %a, 384382; ELF64: cmpdi383  br i1 %cmp, label %if.then, label %if.end384 385if.then:                                          ; preds = %entry386  call void @foo()387  br label %if.end388 389if.end:                                           ; preds = %if.then, %entry390  ret void391}392 393define void @t17(i64 %a) nounwind {394entry:395; ELF64-LABEL: @t17396  %cmp = icmp eq i64 %a, 32768397; Extra operand so we don't match on cmpdi.398; ELF64: cmpd {{[0-9]+}}399  br i1 %cmp, label %if.then, label %if.end400 401if.then:                                          ; preds = %entry402  call void @foo()403  br label %if.end404 405if.end:                                           ; preds = %if.then, %entry406  ret void407}408 409define void @t17a(i64 %a) nounwind {410entry:411; ELF64-LABEL: @t17a412  %cmp = icmp eq i64 32768, %a413; Extra operand so we don't match on cmpdi.414; ELF64: cmpd {{[0-9]+}}415  br i1 %cmp, label %if.then, label %if.end416 417if.then:                                          ; preds = %entry418  call void @foo()419  br label %if.end420 421if.end:                                           ; preds = %if.then, %entry422  ret void423}424 425