Guard fabs to bfc convert with V6T2 flag
[oota-llvm.git] / test / CodeGen / ARM / fast-isel-remat-same-constant.ll
1 ; RUN: llc %s -o - -fast-isel=true -O0 -verify-machineinstrs | FileCheck %s
2
3 target datalayout = "e-m:o-p:32:32-f64:32:64-v64:32:64-v128:32:128-a:0:32-n32-S32"
4 target triple = "thumbv7-apple-ios8.0.0"
5
6 ; This test failed with verify machine instrs due to incorrect kill flags on the add instructions
7 ; generated by the GEPs.  The first add generated killed the vreg for the #6680 constant which should
8 ; be correct.  However, the second add is also a constant expression and the local value save area grows
9 ; down.  This meant the next use of the vreg for #6680 was after the first which had killed it.
10
11 ; CHECK: #6680
12
13 %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]] }
14
15 @tr8x8 = external global %struct.RD_8x8DATA, align 4
16 @tr4x4 = external global %struct.RD_8x8DATA, align 4
17
18 ; Function Attrs: noreturn
19 declare void @foo(i16*, i16*) #0
20
21 ; Function Attrs: minsize
22 define i32 @test() #1 {
23 bb:
24   call void @foo(i16* getelementptr inbounds (%struct.RD_8x8DATA, %struct.RD_8x8DATA* @tr8x8, i32 0, i32 10, i32 0, i32 0), i16* getelementptr inbounds (%struct.RD_8x8DATA, %struct.RD_8x8DATA* @tr4x4, i32 0, i32 10, i32 0, i32 0))
25   unreachable
26 }
27
28 attributes #0 = { noreturn }
29 attributes #1 = { minsize }