File: constant-islands-new-island-padding.ll

package info (click to toggle)
llvm-toolchain-19 1%3A19.1.7-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,998,520 kB
  • sloc: cpp: 6,951,680; ansic: 1,486,157; asm: 913,598; python: 232,024; f90: 80,126; objc: 75,281; lisp: 37,276; pascal: 16,990; sh: 10,009; ml: 5,058; perl: 4,724; awk: 3,523; makefile: 3,167; javascript: 2,504; xml: 892; fortran: 664; cs: 573
file content (42 lines) | stat: -rw-r--r-- 1,319 bytes parent folder | download | duplicates (12)
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
36
37
38
39
40
41
42
; RUN: llc < %s -mtriple=thumbv7-apple-ios %s -o - | FileCheck %s

@g0 = common global i32 0, align 4
@d0 = common global double 0.000000e+00, align 8
@f0 = common global float 0.000000e+00, align 4
@g1 = common global i32 0, align 4

declare i32 @llvm.arm.space(i32, i32)

; Check that the constant island pass moves the float constant pool entry inside
; the function.

; CHECK: .long 0x3f9e05ee @ float 1.23455596
; CHECK: {{.*}} %do.end

define i32 @testpadding(i32 %a) {
entry:
  %0 = load i32, ptr @g0, align 4
  %add = add nsw i32 %0, 12
  store i32 %add, ptr @g0, align 4
  %1 = load double, ptr @d0, align 8
  %add1 = fadd double %1, 0x3FF3C0B8ED46EACB
  store double %add1, ptr @d0, align 8
  %tmpcall11 = call i32 @llvm.arm.space(i32 28, i32 undef)
  call void @foo20(i32 191)
  %2 = load float, ptr @f0, align 4
  %add2 = fadd float %2, 0x3FF3C0BDC0000000
  store float %add2, ptr @f0, align 4
  br label %do.body

do.body:                                          ; preds = %do.body, %entry
  tail call void @foo20(i32 19)
  %3 = load i32, ptr @g1, align 4
  %tobool = icmp eq i32 %3, 0
  br i1 %tobool, label %do.end, label %do.body

do.end:                                           ; preds = %do.body
  %tmpcall111 = call i32 @llvm.arm.space(i32 954, i32 undef)
  ret i32 10
}

declare void @foo20(i32)