1; RUN: llc < %s -mtriple=ve-unknown-unknown | FileCheck %s 2 3define signext i8 @func8s(i8 signext %a, i8 signext %b) { 4; CHECK-LABEL: func8s: 5; CHECK: # %bb.0: 6; CHECK-NEXT: and %s0, %s0, %s1 7; CHECK-NEXT: b.l.t (, %s10) 8 %res = and i8 %a, %b 9 ret i8 %res 10} 11 12define zeroext i8 @func8z(i8 zeroext %a, i8 zeroext %b) { 13; CHECK-LABEL: func8z: 14; CHECK: # %bb.0: 15; CHECK-NEXT: and %s0, %s1, %s0 16; CHECK-NEXT: b.l.t (, %s10) 17 %res = and i8 %b, %a 18 ret i8 %res 19} 20 21define signext i8 @funci8s(i8 signext %a) { 22; CHECK-LABEL: funci8s: 23; CHECK: # %bb.0: 24; CHECK-NEXT: and %s0, 5, %s0 25; CHECK-NEXT: b.l.t (, %s10) 26 %res = and i8 %a, 5 27 ret i8 %res 28} 29 30define zeroext i8 @funci8z(i8 zeroext %a) { 31; CHECK-LABEL: funci8z: 32; CHECK: # %bb.0: 33; CHECK-NEXT: lea %s1, 251 34; CHECK-NEXT: and %s0, %s0, %s1 35; CHECK-NEXT: b.l.t (, %s10) 36 %res = and i8 -5, %a 37 ret i8 %res 38} 39 40define signext i16 @func16s(i16 signext %a, i16 signext %b) { 41; CHECK-LABEL: func16s: 42; CHECK: # %bb.0: 43; CHECK-NEXT: and %s0, %s0, %s1 44; CHECK-NEXT: b.l.t (, %s10) 45 %res = and i16 %a, %b 46 ret i16 %res 47} 48 49define zeroext i16 @func16z(i16 zeroext %a, i16 zeroext %b) { 50; CHECK-LABEL: func16z: 51; CHECK: # %bb.0: 52; CHECK-NEXT: and %s0, %s1, %s0 53; CHECK-NEXT: b.l.t (, %s10) 54 %res = and i16 %b, %a 55 ret i16 %res 56} 57 58define signext i16 @funci16s(i16 signext %a) { 59; CHECK-LABEL: funci16s: 60; CHECK: # %bb.0: 61; CHECK-NEXT: b.l.t (, %s10) 62 %res = and i16 %a, 65535 63 ret i16 %res 64} 65 66define zeroext i16 @funci16z(i16 zeroext %a) { 67; CHECK-LABEL: funci16z: 68; CHECK: # %bb.0: 69; CHECK-NEXT: and %s0, %s0, (52)0 70; CHECK-NEXT: b.l.t (, %s10) 71 %res = and i16 4095, %a 72 ret i16 %res 73} 74 75define signext i32 @func32s(i32 signext %a, i32 signext %b) { 76; CHECK-LABEL: func32s: 77; CHECK: # %bb.0: 78; CHECK-NEXT: and %s0, %s0, %s1 79; CHECK-NEXT: b.l.t (, %s10) 80 %res = and i32 %a, %b 81 ret i32 %res 82} 83 84define zeroext i32 @func32z(i32 zeroext %a, i32 zeroext %b) { 85; CHECK-LABEL: func32z: 86; CHECK: # %bb.0: 87; CHECK-NEXT: and %s0, %s0, %s1 88; CHECK-NEXT: b.l.t (, %s10) 89 %res = and i32 %a, %b 90 ret i32 %res 91} 92 93define signext i32 @funci32s(i32 signext %a) { 94; CHECK-LABEL: funci32s: 95; CHECK: # %bb.0: 96; CHECK-NEXT: and %s0, %s0, (36)0 97; CHECK-NEXT: b.l.t (, %s10) 98 %res = and i32 %a, 268435455 99 ret i32 %res 100} 101 102define zeroext i32 @funci32z(i32 zeroext %a) { 103; CHECK-LABEL: funci32z: 104; CHECK: # %bb.0: 105; CHECK-NEXT: and %s0, %s0, (36)0 106; CHECK-NEXT: b.l.t (, %s10) 107 %res = and i32 %a, 268435455 108 ret i32 %res 109} 110 111define i64 @func64(i64 %a, i64 %b) { 112; CHECK-LABEL: func64: 113; CHECK: # %bb.0: 114; CHECK-NEXT: and %s0, %s0, %s1 115; CHECK-NEXT: b.l.t (, %s10) 116 %res = and i64 %a, %b 117 ret i64 %res 118} 119 120define i64 @func64i(i64 %a) { 121; CHECK-LABEL: func64i: 122; CHECK: # %bb.0: 123; CHECK-NEXT: and %s0, %s0, (24)0 124; CHECK-NEXT: b.l.t (, %s10) 125 %res = and i64 %a, 1099511627775 126 ret i64 %res 127} 128 129define i128 @func128(i128 %a, i128 %b) { 130; CHECK-LABEL: func128: 131; CHECK: # %bb.0: 132; CHECK-NEXT: and %s0, %s2, %s0 133; CHECK-NEXT: and %s1, %s3, %s1 134; CHECK-NEXT: b.l.t (, %s10) 135 %res = and i128 %b, %a 136 ret i128 %res 137} 138 139define i128 @funci128(i128 %a) { 140; CHECK-LABEL: funci128: 141; CHECK: # %bb.0: 142; CHECK-NEXT: and %s0, 5, %s0 143; CHECK-NEXT: or %s1, 0, (0)1 144; CHECK-NEXT: b.l.t (, %s10) 145 %res = and i128 %a, 5 146 ret i128 %res 147} 148