brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.9 KiB · 81c6b99 Raw
90 lines · plain
1; RUN: llc -verify-machineinstrs -mcpu=pwr7 < %s | FileCheck %s2target datalayout = "E-m:e-i64:64-n32:64"3target triple = "powerpc64-unknown-linux-gnu"4 5; Function Attrs: nounwind readnone6define signext i32 @foo(i32 signext %a) #0 {7entry:8  %mul = mul nsw i32 %a, %a9  %shr2 = lshr i32 %mul, 510  ret i32 %shr211 12; CHECK-LABEL: @foo13; CHECK-NOT: rldicl 3, {{[0-9]+}}, 0, 3214; CHECK: blr15}16 17define zeroext i32 @test6(i32 zeroext %x) #0 {18entry:19  %and = lshr i32 %x, 1620  %shr = and i32 %and, 25521  %and1 = shl i32 %x, 1622  %shl = and i32 %and1, 1671168023  %or = or i32 %shr, %shl24  ret i32 %or25 26; CHECK-LABEL: @test627; CHECK-NOT: rldicl 3, {{[0-9]+}}, 0, 3228; CHECK: blr29}30 31define zeroext i32 @min(i32 zeroext %a, i32 zeroext %b) #0 {32entry:33  %cmp = icmp ule i32 %a, %b34  %cond = select i1 %cmp, i32 %a, i32 %b35  ret i32 %cond36 37; CHECK-LABEL: @min38; CHECK-NOT: rldicl 3, {{[0-9]+}}, 0, 3239; CHECK: blr40}41 42; Function Attrs: nounwind readnone43declare i32 @llvm.bswap.i32(i32) #044 45; Function Attrs: nounwind readonly46define zeroext i32 @bs32(ptr nocapture readonly %x) #1 {47entry:48  %0 = load i32, ptr %x, align 449  %1 = tail call i32 @llvm.bswap.i32(i32 %0)50  ret i32 %151 52; CHECK-LABEL: @bs3253; CHECK-NOT: rldicl 3, {{[0-9]+}}, 0, 3254; CHECK: blr55}56 57; Function Attrs: nounwind readonly58define zeroext i16 @bs16(ptr nocapture readonly %x) #1 {59entry:60  %0 = load i16, ptr %x, align 261  %1 = tail call i16 @llvm.bswap.i16(i16 %0)62  ret i16 %163 64; CHECK-LABEL: @bs1665; CHECK-NOT: rldicl 3, {{[0-9]+}}, 0, 3266; CHECK: blr67}68 69; Function Attrs: nounwind readnone70declare i16 @llvm.bswap.i16(i16) #071 72; Function Attrs: nounwind readnone73define zeroext i32 @ctlz32(i32 zeroext %x) #0 {74entry:75  %0 = tail call i32 @llvm.ctlz.i32(i32 %x, i1 false)76  ret i32 %077 78; CHECK-LABEL: @ctlz3279; CHECK-NOT: rldicl 3, {{[0-9]+}}, 0, 3280; CHECK: blr81}82 83; Function Attrs: nounwind readnone84declare i32 @llvm.ctlz.i32(i32, i1) #085 86 87attributes #0 = { nounwind readnone }88attributes #1 = { nounwind readonly }89 90