• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: opt -instcombine -S -o - < %s | FileCheck %s
2declare <4 x float> @llvm.fabs.v4f32(<4 x float>)
3
4define <4 x i1> @test1(<4 x float> %V) {
5entry:
6  %abs = call <4 x float> @llvm.fabs.v4f32(<4 x float> %V)
7  %cmp = fcmp olt <4 x float> %abs, zeroinitializer
8  ret <4 x i1> %cmp
9}
10; CHECK-LABEL: define <4 x i1> @test1(
11; CHECK:   ret <4 x i1> zeroinitializer
12
13declare float @fabsf()
14
15define i1 @test2() {
16  %call = call float @fabsf()
17  %cmp = fcmp olt float %call, 0.000000e+00
18  ret i1 %cmp
19}
20; CHECK-LABEL: define i1 @test2(
21; CHECK:  %[[call:.*]] = call float @fabsf()
22; CHECK:  %[[cmp:.*]] = fcmp olt float %[[call]], 0.000000e+00
23; CHECK:  ret i1 %[[cmp]]
24