1 ; RUN: opt -reassociate %s -S -o - | FileCheck %s
3 ; Reassociate pass used to crash on these example
6 define float @undef1() {
9 ; CHECK: ret float fadd (float undef, float fadd (float undef, float fadd (float fsub (float -0.000000e+00, float undef), float fsub (float -0.000000e+00, float undef))))
10 %0 = fadd fast float undef, undef
11 %1 = fsub fast float undef, %0
12 %2 = fadd fast float undef, %1
16 define void @undef2() {
18 ; CHECK-LABEL: @undef2
20 %0 = fadd fast float undef, undef
21 %1 = fadd fast float %0, 1.000000e+00
22 %2 = fsub fast float %0, %1
23 %3 = fmul fast float %2, 2.000000e+00