brintos

brintos / llvm-project-archived public Read only

0
0
Text · 5.1 KiB · 1e3aa93 Raw
216 lines · plain
1; RUN: llc < %s -mtriple=ve-unknown-unknown | FileCheck %s2 3define signext i8 @func8s(i8 signext %a, i8 signext %b) {4; CHECK-LABEL: func8s:5; CHECK:       # %bb.0:6; CHECK-NEXT:    nnd %s0, %s0, %s17; CHECK-NEXT:    b.l.t (, %s10)8  %not = xor i8 %a, -19  %res = and i8 %not, %b10  ret i8 %res11}12 13define zeroext i8 @func8z(i8 zeroext %a, i8 zeroext %b) {14; CHECK-LABEL: func8z:15; CHECK:       # %bb.0:16; CHECK-NEXT:    nnd %s0, %s0, %s117; CHECK-NEXT:    b.l.t (, %s10)18  %not = xor i8 %a, -119  %res = and i8 %b, %not20  ret i8 %res21}22 23define signext i8 @funci8s(i8 signext %a) {24; CHECK-LABEL: funci8s:25; CHECK:       # %bb.0:26; CHECK-NEXT:    or %s1, 5, (0)127; CHECK-NEXT:    nnd %s0, %s0, %s128; CHECK-NEXT:    b.l.t (, %s10)29  %not = xor i8 %a, -130  %res = and i8 %not, 531  ret i8 %res32}33 34define zeroext i8 @funci8z(i8 zeroext %a) {35; CHECK-LABEL: funci8z:36; CHECK:       # %bb.0:37; CHECK-NEXT:    lea %s1, 25138; CHECK-NEXT:    nnd %s0, %s0, %s139; CHECK-NEXT:    b.l.t (, %s10)40  %not = xor i8 %a, -141  %res = and i8 -5, %not42  ret i8 %res43}44 45define signext i16 @func16s(i16 signext %a, i16 signext %b) {46; CHECK-LABEL: func16s:47; CHECK:       # %bb.0:48; CHECK-NEXT:    nnd %s0, %s0, %s149; CHECK-NEXT:    b.l.t (, %s10)50  %not = xor i16 %a, -151  %res = and i16 %not, %b52  ret i16 %res53}54 55define zeroext i16 @func16z(i16 zeroext %a, i16 zeroext %b) {56; CHECK-LABEL: func16z:57; CHECK:       # %bb.0:58; CHECK-NEXT:    nnd %s0, %s0, %s159; CHECK-NEXT:    b.l.t (, %s10)60  %not = xor i16 %a, -161  %res = and i16 %b, %not62  ret i16 %res63}64 65define signext i16 @funci16s(i16 signext %a) {66; CHECK-LABEL: funci16s:67; CHECK:       # %bb.0:68; CHECK-NEXT:    xor %s0, -1, %s069; CHECK-NEXT:    b.l.t (, %s10)70  %not = xor i16 %a, -171  %res = and i16 %not, 6553572  ret i16 %res73}74 75define zeroext i16 @funci16z(i16 zeroext %a) {76; CHECK-LABEL: funci16z:77; CHECK:       # %bb.0:78; CHECK-NEXT:    nnd %s0, %s0, (52)079; CHECK-NEXT:    b.l.t (, %s10)80  %not = xor i16 %a, -181  %res = and i16 4095, %not82  ret i16 %res83}84 85define signext i32 @func32s(i32 signext %a, i32 signext %b) {86; CHECK-LABEL: func32s:87; CHECK:       # %bb.0:88; CHECK-NEXT:    nnd %s0, %s0, %s189; CHECK-NEXT:    b.l.t (, %s10)90  %not = xor i32 %a, -191  %res = and i32 %not, %b92  ret i32 %res93}94 95define zeroext i32 @func32z(i32 zeroext %a, i32 zeroext %b) {96; CHECK-LABEL: func32z:97; CHECK:       # %bb.0:98; CHECK-NEXT:    nnd %s0, %s0, %s199; CHECK-NEXT:    b.l.t (, %s10)100  %not = xor i32 %a, -1101  %res = and i32 %not, %b102  ret i32 %res103}104 105define signext i32 @funci32s(i32 signext %a) {106; CHECK-LABEL: funci32s:107; CHECK:       # %bb.0:108; CHECK-NEXT:    nnd %s0, %s0, (36)0109; CHECK-NEXT:    b.l.t (, %s10)110  %not = xor i32 %a, -1111  %res = and i32 %not, 268435455112  ret i32 %res113}114 115define zeroext i32 @funci32z(i32 zeroext %a) {116; CHECK-LABEL: funci32z:117; CHECK:       # %bb.0:118; CHECK-NEXT:    nnd %s0, %s0, (36)0119; CHECK-NEXT:    b.l.t (, %s10)120  %not = xor i32 %a, -1121  %res = and i32 %not, 268435455122  ret i32 %res123}124 125define i64 @func64(i64 %a, i64 %b) {126; CHECK-LABEL: func64:127; CHECK:       # %bb.0:128; CHECK-NEXT:    nnd %s0, %s0, %s1129; CHECK-NEXT:    b.l.t (, %s10)130  %not = xor i64 %a, -1131  %res = and i64 %not, %b132  ret i64 %res133}134 135define i64 @func64_2(i64 %a, i64 %b) {136; CHECK-LABEL: func64_2:137; CHECK:       # %bb.0:138; CHECK-NEXT:    nnd %s0, %s1, %s0139; CHECK-NEXT:    b.l.t (, %s10)140  %not = xor i64 %b, -1141  %res = and i64 %not, %a142  ret i64 %res143}144 145define i64 @func64i(i64 %a) {146; CHECK-LABEL: func64i:147; CHECK:       # %bb.0:148; CHECK-NEXT:    nnd %s0, %s0, (24)0149; CHECK-NEXT:    b.l.t (, %s10)150  %not = xor i64 %a, -1151  %res = and i64 %not, 1099511627775152  ret i64 %res153}154 155define i128 @func128(i128 %a, i128 %b) {156; CHECK-LABEL: func128:157; CHECK:       # %bb.0:158; CHECK-NEXT:    nnd %s0, %s0, %s2159; CHECK-NEXT:    nnd %s1, %s1, %s3160; CHECK-NEXT:    b.l.t (, %s10)161  %not = xor i128 %a, -1162  %res = and i128 %b, %not163  ret i128 %res164}165 166define i128 @funci128(i128 %a) {167; CHECK-LABEL: funci128:168; CHECK:       # %bb.0:169; CHECK-NEXT:    or %s1, 5, (0)1170; CHECK-NEXT:    nnd %s0, %s0, %s1171; CHECK-NEXT:    or %s1, 0, (0)1172; CHECK-NEXT:    b.l.t (, %s10)173  %not = xor i128 %a, -1174  %res = and i128 %not, 5175  ret i128 %res176}177 178define i64 @func64_nnd_fold(i64 %x, i64 %y, i64 %m) {179; CHECK-LABEL: func64_nnd_fold:180; CHECK:       # %bb.0:181; CHECK-NEXT:    nnd %s1, %s2, %s1182; CHECK-NEXT:    and %s0, %s0, %s2183; CHECK-NEXT:    or %s0, %s0, %s1184; CHECK-NEXT:    b.l.t (, %s10)185  %D = xor i64 %x, %y186  %A = and i64 %D, %m187  %res = xor i64 %A, %y188  ret i64 %res189}190 191define i64 @func64iy_nnd_fold(i64 %x, i64 %m) {192; CHECK-LABEL: func64iy_nnd_fold:193; CHECK:       # %bb.0:194; CHECK-NEXT:    nnd %s0, %s0, %s1195; CHECK-NEXT:    or %s1, -64, %s1196; CHECK-NEXT:    nnd %s0, %s0, %s1197; CHECK-NEXT:    b.l.t (, %s10)198  %D = xor i64 %x, -64199  %A = and i64 %D, %m200  %res = xor i64 %A, -64201  ret i64 %res202}203 204define i64 @func64im_nnd_fold(i64 %x, i64 %y) {205; CHECK-LABEL: func64im_nnd_fold:206; CHECK:       # %bb.0:207; CHECK-NEXT:    xor %s0, %s0, %s1208; CHECK-NEXT:    and %s0, 30, %s0209; CHECK-NEXT:    xor %s0, %s0, %s1210; CHECK-NEXT:    b.l.t (, %s10)211  %D = xor i64 %x, %y212  %A = and i64 %D, 30213  %res = xor i64 %A, %y214  ret i64 %res215}216