File: trunc-srl-load.ll

package info (click to toggle)
llvm-toolchain-20 1%3A20.1.6-1~exp1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 2,111,304 kB
  • sloc: cpp: 7,438,677; ansic: 1,393,822; asm: 1,012,926; python: 241,650; f90: 86,635; objc: 75,479; lisp: 42,144; pascal: 17,286; sh: 10,027; ml: 5,082; perl: 4,730; awk: 3,523; makefile: 3,349; javascript: 2,251; xml: 892; fortran: 672
file content (34 lines) | stat: -rw-r--r-- 1,051 bytes parent folder | download | duplicates (14)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc -mtriple=powerpc64-unknown-unknown %s -o - | FileCheck %s

define dso_local fastcc void @trunc_srl_load(i32 zeroext %AttrArgNo) {
; CHECK-LABEL: trunc_srl_load:
; CHECK:       # %bb.0: # %entry
; CHECK-NEXT:    lhz 4, 2(0)
; CHECK-NEXT:    cmplw 4, 3
; CHECK-NEXT:    ble 0, .LBB0_2
; CHECK-NEXT:  # %bb.1: # %exit
; CHECK-NEXT:  .LBB0_2: # %cond.false
entry:
  %bf.load.i = load i64, ptr null, align 8
  %bf.lshr.i = lshr i64 %bf.load.i, 32
  %0 = trunc i64 %bf.lshr.i to i32
  %bf.cast.i = and i32 %0, 65535
  %cmp.i = icmp ugt i32 %bf.cast.i, %AttrArgNo
  br i1 %cmp.i, label %exit, label %cond.false
exit:       ; preds = %entry
  unreachable
cond.false:                                       ; preds = %entry
  unreachable
}

define i32 @sh_trunc_sh(i64 %x) {
; CHECK-LABEL: sh_trunc_sh:
; CHECK:       # %bb.0:
; CHECK-NEXT:    rldicl 3, 3, 47, 36
; CHECK-NEXT:    blr
  %s = lshr i64 %x, 13
  %t = trunc i64 %s to i32
  %r = lshr i32 %t, 4
  ret i32 %r
}