diff options
Diffstat (limited to 'llvm/test/Transforms/InstCombine/or-fcmp.ll')
| -rw-r--r-- | llvm/test/Transforms/InstCombine/or-fcmp.ll | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/llvm/test/Transforms/InstCombine/or-fcmp.ll b/llvm/test/Transforms/InstCombine/or-fcmp.ll index 848e2c5d40f..ede6853b657 100644 --- a/llvm/test/Transforms/InstCombine/or-fcmp.ll +++ b/llvm/test/Transforms/InstCombine/or-fcmp.ll @@ -1,6 +1,30 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py ; RUN: opt < %s -instcombine -S | FileCheck %s +define i1 @fcmp_uno_nonzero(float %x, float %y) { +; CHECK-LABEL: @fcmp_uno_nonzero( +; CHECK-NEXT: [[TMP1:%.*]] = fcmp uno float %x, %y +; CHECK-NEXT: ret i1 [[TMP1]] +; + %cmp1 = fcmp uno float %x, 1.0 + %cmp2 = fcmp uno float %y, 2.0 + %or = or i1 %cmp1, %cmp2 + ret i1 %or +} + +define <3 x i1> @fcmp_uno_nonzero_vec(<3 x float> %x, <3 x float> %y) { +; CHECK-LABEL: @fcmp_uno_nonzero_vec( +; CHECK-NEXT: [[CMP1:%.*]] = fcmp uno <3 x float> %x, <float 1.000000e+00, float 2.000000e+00, float 3.000000e+00> +; CHECK-NEXT: [[CMP2:%.*]] = fcmp uno <3 x float> %y, <float 3.000000e+00, float 2.000000e+00, float 1.000000e+00> +; CHECK-NEXT: [[OR:%.*]] = or <3 x i1> [[CMP1]], [[CMP2]] +; CHECK-NEXT: ret <3 x i1> [[OR]] +; + %cmp1 = fcmp uno <3 x float> %x, <float 1.0, float 2.0, float 3.0> + %cmp2 = fcmp uno <3 x float> %y, <float 3.0, float 2.0, float 1.0> + %or = or <3 x i1> %cmp1, %cmp2 + ret <3 x i1> %or +} + define i1 @auto_gen_0(double %a, double %b) { ; CHECK-LABEL: @auto_gen_0( ; CHECK-NEXT: ret i1 false |

