File: fast-isel-remat-same-constant.ll

package info (click to toggle)
llvm-toolchain-19 1%3A19.1.7-3~deb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-proposed-updates
  • size: 1,998,492 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 (29 lines) | stat: -rw-r--r-- 1,326 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
; RUN: llc %s -o - -fast-isel=true -O0 -verify-machineinstrs | FileCheck %s

target datalayout = "e-m:o-p:32:32-f64:32:64-v64:32:64-v128:32:128-a:0:32-n32-S32"
target triple = "thumbv7-apple-ios8.0.0"

; This test failed with verify machine instrs due to incorrect kill flags on the add instructions
; generated by the GEPs.  The first add generated killed the vreg for the #6680 constant which should
; be correct.  However, the second add is also a constant expression and the local value save area grows
; down.  This meant the next use of the vreg for #6680 was after the first which had killed it.

; CHECK: #6680

%struct.RD_8x8DATA = type { i32, [16 x [16 x i32]], [16 x [16 x i32]], [16 x [16 x i32]], [3 x [16 x [16 x i32]]], [4 x i16], [4 x i8], [4 x i8], [4 x i8], [16 x [16 x i16]], [16 x [16 x i16]], [16 x [16 x i32]] }

@tr8x8 = external global %struct.RD_8x8DATA, align 4
@tr4x4 = external global %struct.RD_8x8DATA, align 4

; Function Attrs: noreturn
declare void @foo(ptr, ptr) #0

; Function Attrs: minsize
define i32 @test() #1 {
bb:
  call void @foo(ptr getelementptr inbounds (%struct.RD_8x8DATA, ptr @tr8x8, i32 0, i32 10, i32 0, i32 0), ptr getelementptr inbounds (%struct.RD_8x8DATA, ptr @tr4x4, i32 0, i32 10, i32 0, i32 0))
  unreachable
}

attributes #0 = { noreturn }
attributes #1 = { minsize }