1 ; RUN: llc -mtriple=arm-eabi -mcpu=cortex-a8 -mattr=+vfp2 -enable-unsafe-fp-math %s -o - \
7 ; Disable this optimization unless we know one of them is zero.
8 define arm_apcscc i32 @t1(float* %a, float* %b) nounwind {
11 ; CHECK: vldr [[S0:s[0-9]+]],
12 ; CHECK: vldr [[S1:s[0-9]+]],
13 ; CHECK: vcmp.f32 [[S1]], [[S0]]
14 ; CHECK: vmrs APSR_nzcv, fpscr
16 %0 = load float, float* %a
17 %1 = load float, float* %b
18 %2 = fcmp une float %0, %1
19 br i1 %2, label %bb1, label %bb2
30 ; If one side is zero, the other size sign bit is masked off to allow
32 define arm_apcscc i32 @t2(double* %a, double* %b) nounwind {
36 ; CHECK: ldrd [[REG1:(r[0-9]+)]], [[REG2:(r[0-9]+)]], [r0]
38 ; CHECK: bic [[REG2]], [[REG2]], #-2147483648
39 ; CHECK: cmp [[REG1]], #0
40 ; CHECK: cmpeq [[REG2]], #0
44 %0 = load double, double* %a
45 %1 = fcmp oeq double %0, 0.000000e+00
46 br i1 %1, label %bb1, label %bb2
57 define arm_apcscc i32 @t3(float* %a, float* %b) nounwind {
61 ; CHECK: ldr [[REG3:(r[0-9]+)]], [r0]
62 ; CHECK: mvn [[REG4:(r[0-9]+)]], #-2147483648
63 ; CHECK: tst [[REG3]], [[REG4]]
67 %0 = load float, float* %a
68 %1 = fcmp oeq float %0, 0.000000e+00
69 br i1 %1, label %bb1, label %bb2