• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: opt -early-cse -earlycse-debug-hash -S < %s | FileCheck %s
2; RUN: opt -basic-aa -early-cse-memssa -S < %s | FileCheck %s
3
4declare void @use(i1)
5
6define void @test1(float %x, float %y) {
7entry:
8  %cmp1 = fcmp nnan oeq float %y, %x
9  %cmp2 = fcmp oeq float %x, %y
10  call void @use(i1 %cmp1)
11  call void @use(i1 %cmp2)
12  ret void
13}
14
15; CHECK-LABEL: define void @test1(
16; CHECK: %[[cmp:.*]] = fcmp oeq float %y, %x
17; CHECK-NEXT: call void @use(i1 %[[cmp]])
18; CHECK-NEXT: call void @use(i1 %[[cmp]])
19; CHECK-NEXT: ret void
20