• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: opt -reassociate %s -S -o - | FileCheck %s
2
3; Reassociate pass used to crash on these example
4
5
6define float @undef1() {
7wrapper_entry:
8; CHECK-LABEL: @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
13  ret float %2
14}
15
16define void @undef2() {
17wrapper_entry:
18; CHECK-LABEL: @undef2
19; CHECK: unreachable
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
24  unreachable
25}
26