1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -instcombine -S | FileCheck %s
6 define float @test(float %x, x86_fp80 %y) nounwind readonly {
9 ; CHECK-NEXT: [[TMP67:%.*]] = fcmp uno x86_fp80 [[Y:%.*]], 0xK00000000000000000000
10 ; CHECK-NEXT: [[TMP71:%.*]] = fcmp uno float [[X:%.*]], 0.000000e+00
11 ; CHECK-NEXT: [[BOTHCOND:%.*]] = or i1 [[TMP67]], [[TMP71]]
12 ; CHECK-NEXT: br i1 [[BOTHCOND]], label [[BB74:%.*]], label [[BB80:%.*]]
14 ; CHECK-NEXT: ret float 0.000000e+00
16 ; CHECK-NEXT: ret float 0.000000e+00
19 %tmp67 = fcmp uno x86_fp80 %y, 0xK00000000000000000000 ; <i1> [#uses=1]
20 %tmp71 = fcmp uno float %x, 0.000000e+00 ; <i1> [#uses=1]
21 %bothcond = or i1 %tmp67, %tmp71 ; <i1> [#uses=1]
22 br i1 %bothcond, label %bb74, label %bb80
24 bb74: ; preds = %entry
25 ret float 0.000000e+00
27 bb80: ; preds = %entry
28 ret float 0.000000e+00
31 define float @test_logical(float %x, x86_fp80 %y) nounwind readonly {
32 ; CHECK-LABEL: @test_logical(
34 ; CHECK-NEXT: [[TMP67:%.*]] = fcmp uno x86_fp80 [[Y:%.*]], 0xK00000000000000000000
35 ; CHECK-NEXT: [[TMP71:%.*]] = fcmp uno float [[X:%.*]], 0.000000e+00
36 ; CHECK-NEXT: [[BOTHCOND:%.*]] = select i1 [[TMP67]], i1 true, i1 [[TMP71]]
37 ; CHECK-NEXT: br i1 [[BOTHCOND]], label [[BB74:%.*]], label [[BB80:%.*]]
39 ; CHECK-NEXT: ret float 0.000000e+00
41 ; CHECK-NEXT: ret float 0.000000e+00
44 %tmp67 = fcmp uno x86_fp80 %y, 0xK00000000000000000000 ; <i1> [#uses=1]
45 %tmp71 = fcmp uno float %x, 0.000000e+00 ; <i1> [#uses=1]
46 %bothcond = select i1 %tmp67, i1 true, i1 %tmp71 ; <i1> [#uses=1]
47 br i1 %bothcond, label %bb74, label %bb80
49 bb74: ; preds = %entry
50 ret float 0.000000e+00
52 bb80: ; preds = %entry
53 ret float 0.000000e+00