brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · 172c0ff Raw
76 lines · plain
1; RUN: llc -mtriple=hexagon < %s | FileCheck %s2 3target triple = "hexagon"4 5; CHECK-LABEL: ua6; CHECK: extractu(r0,#26,#0)7define i32 @ua(i32 %x) local_unnamed_addr #0 {8entry:9  %shl = and i32 %x, 6710886310  ret i32 %shl11}12 13; CHECK-LABEL: ub14; CHECK: extractu(r0,#16,#4)15define i32 @ub(i32 %x) local_unnamed_addr #0 {16entry:17  %0 = lshr i32 %x, 418  %shr = and i32 %0, 6553519  ret i32 %shr20}21 22; CHECK-LABEL: uc23; CHECK: extractu(r0,#24,#0)24define i32 @uc(i32 %x) local_unnamed_addr #0 {25entry:26  %shl = and i32 %x, 1677721527  ret i32 %shl28}29 30; CHECK-LABEL: ud31; CHECK: extractu(r0,#16,#8)32define i32 @ud(i32 %x) local_unnamed_addr #0 {33entry:34  %bf.lshr = lshr i32 %x, 835  %bf.clear = and i32 %bf.lshr, 6553536  ret i32 %bf.clear37}38 39; CHECK-LABEL: sa40; CHECK: extract(r0,#26,#0)41define i32 @sa(i32 %x) local_unnamed_addr #0 {42entry:43  %shl = shl i32 %x, 644  %shr = ashr exact i32 %shl, 645  ret i32 %shr46}47 48; CHECK-LABEL: sb49; CHECK: extract(r0,#16,#4)50define i32 @sb(i32 %x) local_unnamed_addr #0 {51entry:52  %shl = shl i32 %x, 1253  %shr = ashr i32 %shl, 1654  ret i32 %shr55}56 57; CHECK-LABEL: sc58; CHECK: extract(r0,#24,#0)59define i32 @sc(i32 %x) local_unnamed_addr #0 {60entry:61  %shl = shl i32 %x, 862  %shr = ashr exact i32 %shl, 863  ret i32 %shr64}65 66; CHECK-LABEL: sd67; CHECK: extract(r0,#16,#8)68define i32 @sd(i32 %x) local_unnamed_addr #0 {69entry:70  %bf.shl = shl i32 %x, 871  %bf.ashr = ashr i32 %bf.shl, 1672  ret i32 %bf.ashr73}74 75attributes #0 = { noinline norecurse nounwind readnone "target-cpu"="hexagonv60" "target-features"="-hvx,-long-calls" }76