1
; RUN: llc -mcpu=pwr7 < %s | FileCheck %s
2
target datalayout = "E-m:e-i64:64-n32:64"
3
target triple = "powerpc64-unknown-linux-gnu"
5
; Function Attrs: nounwind readnone
6
define signext i32 @foo(i32 signext %a) #0 {
8
%mul = mul nsw i32 %a, %a
9
%shr2 = lshr i32 %mul, 5
13
; CHECK-NOT: rldicl 3, {{[0-9]+}}, 0, 32
17
define zeroext i32 @test6(i32 zeroext %x) #0 {
19
%and = lshr i32 %x, 16
20
%shr = and i32 %and, 255
21
%and1 = shl i32 %x, 16
22
%shl = and i32 %and1, 16711680
23
%or = or i32 %shr, %shl
27
; CHECK-NOT: rldicl 3, {{[0-9]+}}, 0, 32
31
define zeroext i32 @min(i32 zeroext %a, i32 zeroext %b) #0 {
33
%cmp = icmp ule i32 %a, %b
34
%cond = select i1 %cmp, i32 %a, i32 %b
38
; CHECK-NOT: rldicl 3, {{[0-9]+}}, 0, 32
42
; Function Attrs: nounwind readnone
43
declare i32 @llvm.bswap.i32(i32) #0
45
; Function Attrs: nounwind readonly
46
define zeroext i32 @bs32(i32* nocapture readonly %x) #1 {
48
%0 = load i32, i32* %x, align 4
49
%1 = tail call i32 @llvm.bswap.i32(i32 %0)
53
; CHECK-NOT: rldicl 3, {{[0-9]+}}, 0, 32
57
; Function Attrs: nounwind readonly
58
define zeroext i16 @bs16(i16* nocapture readonly %x) #1 {
60
%0 = load i16, i16* %x, align 2
61
%1 = tail call i16 @llvm.bswap.i16(i16 %0)
65
; CHECK-NOT: rldicl 3, {{[0-9]+}}, 0, 32
69
; Function Attrs: nounwind readnone
70
declare i16 @llvm.bswap.i16(i16) #0
72
; Function Attrs: nounwind readnone
73
define zeroext i32 @ctlz32(i32 zeroext %x) #0 {
75
%0 = tail call i32 @llvm.ctlz.i32(i32 %x, i1 false)
78
; CHECK-LABEL: @ctlz32
79
; CHECK-NOT: rldicl 3, {{[0-9]+}}, 0, 32
83
; Function Attrs: nounwind readnone
84
declare i32 @llvm.ctlz.i32(i32, i1) #0
87
attributes #0 = { nounwind readnone }
88
attributes #1 = { nounwind readonly }