1 ; RUN: opt -reassociate -S < %s | FileCheck %s
4 @a = common global i32 0, align 4
5 @b = common global i32 0, align 4
7 ; Don't canonicalize %conv - undef into %conv + (-undef).
9 ; CHECK: %sub = fsub fast float %conv, undef
10 ; CHECK: %sub1 = fadd fast float %sub, -1.000000e+00
14 %0 = load i32, i32* @a, align 4
15 %conv = sitofp i32 %0 to float
16 %sub = fsub fast float %conv, undef
17 %sub1 = fadd fast float %sub, -1.000000e+00
18 %conv2 = fptosi float %sub1 to i32
19 store i32 %conv2, i32* @b, align 4