File: ipra-04.ll

package info (click to toggle)
llvm-toolchain-14 1%3A14.0.6-12
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,496,180 kB
  • sloc: cpp: 5,593,972; ansic: 986,872; asm: 585,869; python: 184,223; objc: 72,530; lisp: 31,119; f90: 27,793; javascript: 9,780; pascal: 9,762; sh: 9,482; perl: 7,468; ml: 5,432; awk: 3,523; makefile: 2,538; xml: 953; cs: 573; fortran: 567
file content (35 lines) | stat: -rw-r--r-- 1,320 bytes parent folder | download | duplicates (9)
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
35
; Test that the updated regmask on the call to @fun1 preserves %r14 and
; %15. @fun1 will save and restore these registers since it contains a call.
;
; RUN: llc -mtriple=s390x-linux-gnu -mcpu=z13 -enable-ipra -print-regmask-num-regs=-1 \
; RUN:   -debug-only=ip-regalloc 2>&1 < %s | FileCheck --check-prefix=DBG %s
; REQUIRES: asserts
;
; DBG: fun1 function optimized for not having CSR
; DBG: Call Instruction After Register Usage Info Propagation :
; DBG-NEXT: CallBRASL @fun1{{.*}} $r14d $r15d

declare dso_local fastcc signext i32 @foo(i16*, i32 signext) unnamed_addr

define internal fastcc void @fun1(i16* %arg, i16* nocapture %arg1) unnamed_addr #0 {
bb:
  %tmp = load i16, i16* undef, align 2
  %tmp2 = shl i16 %tmp, 4
  %tmp3 = tail call fastcc signext i32 @foo(i16* nonnull %arg, i32 signext 5)
  %tmp4 = or i16 0, %tmp2
  %tmp5 = or i16 %tmp4, 0
  store i16 %tmp5, i16* undef, align 2
  %tmp6 = getelementptr inbounds i16, i16* %arg, i64 5
  %tmp7 = load i16, i16* %tmp6, align 2
  store i16 %tmp7, i16* %arg1, align 2
  ret void
}

define fastcc void @fun0(i8* nocapture readonly %arg, i16* nocapture %arg1, i32 signext %arg2) unnamed_addr {
bb:
  %a = alloca i8, i64 undef
  call fastcc void @fun1(i16* nonnull undef, i16* %arg1)
  ret void
}

attributes #0 = { norecurse nounwind "frame-pointer"="none" }