1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=powerpc64-unknown-unknown %s -o - | FileCheck %s
4 define dso_local fastcc void @trunc_srl_load(i32 zeroext %AttrArgNo) {
5 ; CHECK-LABEL: trunc_srl_load:
6 ; CHECK: # %bb.0: # %entry
7 ; CHECK-NEXT: lhz 4, 2(0)
8 ; CHECK-NEXT: cmplw 4, 3
9 ; CHECK-NEXT: ble 0, .LBB0_2
10 ; CHECK-NEXT: # %bb.1: # %exit
11 ; CHECK-NEXT: .LBB0_2: # %cond.false
13 %bf.load.i = load i64, ptr null, align 8
14 %bf.lshr.i = lshr i64 %bf.load.i, 32
15 %0 = trunc i64 %bf.lshr.i to i32
16 %bf.cast.i = and i32 %0, 65535
17 %cmp.i = icmp ugt i32 %bf.cast.i, %AttrArgNo
18 br i1 %cmp.i, label %exit, label %cond.false
19 exit: ; preds = %entry
21 cond.false: ; preds = %entry
25 define i32 @sh_trunc_sh(i64 %x) {
26 ; CHECK-LABEL: sh_trunc_sh:
28 ; CHECK-NEXT: rldicl 3, 3, 47, 36
31 %t = trunc i64 %s to i32