[InstCombine] Signed saturation patterns
[llvm-core.git] / test / CodeGen / ARM / pr42638-VMOVRRDCombine.ll
blobaac5de4ce5e3c962b48063c47a01e1e5d2c44a84
1 ; RUN: llc -stop-after=machine-scheduler -debug-only dagcombine,selectiondag -o - %s 2>&1 | FileCheck %s
2 ; REQUIRES: asserts
3 ; pr42638
4 target triple = "armv8r-arm-none-eabi"
5 %struct.__va_list = type { i8* }
6 define double @foo(i32 %P0, ...) #0 {
7 entry:
8   %V1 = alloca [8 x i8], align 8
9   %vl = alloca %struct.__va_list, align 4
10   %0 = getelementptr inbounds [8 x i8], [8 x i8]* %V1, i32 0, i32 0
11   call void asm sideeffect "", "r"(i8* nonnull %0)
12   %1 = bitcast %struct.__va_list* %vl to i8*
13   call void @llvm.va_start(i8* nonnull %1)
14   %2 = bitcast %struct.__va_list* %vl to double**
15   %argp.cur3 = load double*, double** %2, align 4
16   %v.sroa.0.0.copyload = load double, double* %argp.cur3, align 4
17   ret double %v.sroa.0.0.copyload
20 declare void @llvm.va_start(i8*)
22 attributes #0 = { "target-cpu"="cortex-r52" "target-features"="-fp64"  }
24 ; Ensures that the machine scheduler does not move accessing the upper
25 ; 32 bits of the double to before actually storing it to memory
27 ; CHECK: Creating new node: {{.*}} = add FrameIndex:i32<2>, Constant:i32<4>
28 ; CHECK-NEXT: Creating new node: {{.*}} i32,ch = load<(load 4 from [[MEM:%.*]] + 4)>
29 ; CHECK: INLINEASM
30 ; CHECK: (load 4 from [[MEM]] + 4)
31 ; CHECK-NOT: (store 4 into [[MEM]] + 4)