Home | History | Annotate | Download | only in ARM
      1 ; RUN: opt -mtriple=arm-arm-none-eabi -consthoist -S < %s | FileCheck %s
      2 
      3 ; There are different candidates here for the base constant: 1073876992 and
      4 ; 1073876996. But we don't want to see the latter because it results in
      5 ; negative offsets.
      6 
      7 define void @foo() #0 {
      8 entry:
      9 ; CHECK-LABEL: @foo
     10 ; CHECK-NOT: [[CONST1:%const_mat[0-9]*]] = add i32 %const, -4
     11   %0 = load volatile i32, i32* inttoptr (i32 1073876992 to i32*), align 4096
     12   %or = or i32 %0, 1
     13   store volatile i32 %or, i32* inttoptr (i32 1073876992 to i32*), align 4096
     14   %1 = load volatile i32, i32* inttoptr (i32 1073876996 to i32*), align 4
     15   %and = and i32 %1, -117506048
     16   store volatile i32 %and, i32* inttoptr (i32 1073876996 to i32*), align 4
     17   %2 = load volatile i32, i32* inttoptr (i32 1073876992 to i32*), align 4096
     18   %and1 = and i32 %2, -17367041
     19   store volatile i32 %and1, i32* inttoptr (i32 1073876996 to i32*), align 4096
     20   %3 = load volatile i32, i32* inttoptr (i32 1073876992 to i32*), align 4096
     21   %and2 = and i32 %3, -262145
     22   store volatile i32 %and2, i32* inttoptr (i32 1073876992 to i32*), align 4096
     23   %4 = load volatile i32, i32* inttoptr (i32 1073876996 to i32*), align 4
     24   %and3 = and i32 %4, -8323073
     25   store volatile i32 %and3, i32* inttoptr (i32 1073876996 to i32*), align 4
     26   store volatile i32 10420224, i32* inttoptr (i32 1073877000 to i32*), align 8
     27   %5 = load volatile i32, i32* inttoptr (i32 1073876996 to i32*), align 4096
     28   %or4 = or i32 %5, 65536
     29   store volatile i32 %or4, i32* inttoptr (i32 1073876996 to i32*), align 4096
     30   %6 = load volatile i32, i32* inttoptr (i32 1073881088 to i32*), align 8192
     31   %or6.i.i = or i32 %6, 16
     32   store volatile i32 %or6.i.i, i32* inttoptr (i32 1073881088 to i32*), align 8192
     33   %7 = load volatile i32, i32* inttoptr (i32 1073881088 to i32*), align 8192
     34   %and7.i.i = and i32 %7, -4
     35   store volatile i32 %and7.i.i, i32* inttoptr (i32 1073881088 to i32*), align 8192
     36   %8 = load volatile i32, i32* inttoptr (i32 1073881088 to i32*), align 8192
     37   %or8.i.i = or i32 %8, 2
     38   store volatile i32 %or8.i.i, i32* inttoptr (i32 1073881088 to i32*), align 8192
     39   ret void
     40 }
     41 
     42 attributes #0 = { minsize norecurse nounwind optsize readnone uwtable }
     43