1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5
2 ; RUN: opt -S -passes=ipsccp < %s | FileCheck %s
5 define i1 @no_fold_fcmp_denormal_double_ieee_dynamic_denormal_undef() #0 {
6 ; CHECK-LABEL: define i1 @no_fold_fcmp_denormal_double_ieee_dynamic_denormal_undef(
7 ; CHECK-SAME: ) #[[ATTR0:[0-9]+]] {
8 ; CHECK-NEXT: [[CMP:%.*]] = fcmp une double 0x8000000000000, undef
9 ; CHECK-NEXT: ret i1 [[CMP]]
11 %cmp = fcmp une double 0x8000000000000, undef
15 define i1 @no_fold_fcmp_denormal_double_ieee_dynamic_denormal_poison() #0 {
16 ; CHECK-LABEL: define i1 @no_fold_fcmp_denormal_double_ieee_dynamic_denormal_poison(
17 ; CHECK-SAME: ) #[[ATTR0]] {
18 ; CHECK-NEXT: [[CMP:%.*]] = fcmp une double 0x8000000000000, poison
19 ; CHECK-NEXT: ret i1 [[CMP]]
21 %cmp = fcmp une double 0x8000000000000, poison
25 define i1 @no_fold_fcmp_denormal_double_ieee_dynamic() #0 {
26 ; CHECK-LABEL: define i1 @no_fold_fcmp_denormal_double_ieee_dynamic(
27 ; CHECK-SAME: ) #[[ATTR0]] {
28 ; CHECK-NEXT: [[CMP:%.*]] = fcmp une double 0x8000000000000, 0.000000e+00
29 ; CHECK-NEXT: ret i1 [[CMP]]
31 %cmp = fcmp une double 0x8000000000000, 0.0
35 define i1 @fold_fcmp_nondenormal_double_ieee_dynamic() #0 {
36 ; CHECK-LABEL: define i1 @fold_fcmp_nondenormal_double_ieee_dynamic(
37 ; CHECK-SAME: ) #[[ATTR0]] {
38 ; CHECK-NEXT: ret i1 true
40 %cmp = fcmp une double 2.0, 0.0
44 define <2 x i1> @no_fold_fcmp_denormal_double_ieee_dynamic_vector_splat() #0 {
45 ; CHECK-LABEL: define <2 x i1> @no_fold_fcmp_denormal_double_ieee_dynamic_vector_splat(
46 ; CHECK-SAME: ) #[[ATTR0]] {
47 ; CHECK-NEXT: [[CMP:%.*]] = fcmp une <2 x double> splat (double 0x8000000000000), zeroinitializer
48 ; CHECK-NEXT: ret <2 x i1> [[CMP]]
50 %cmp = fcmp une <2 x double> splat (double 0x8000000000000), zeroinitializer
54 define <2 x i1> @fold_fcmp_nondenormal_double_ieee_dynamic_vector_splat() #0 {
55 ; CHECK-LABEL: define <2 x i1> @fold_fcmp_nondenormal_double_ieee_dynamic_vector_splat(
56 ; CHECK-SAME: ) #[[ATTR0]] {
57 ; CHECK-NEXT: ret <2 x i1> splat (i1 true)
59 %cmp = fcmp une <2 x double> splat (double 2.0), zeroinitializer
63 define <2 x i1> @fold_fcmp_nondenormal_double_ieee_dynamic_vector_nonsplat() #0 {
64 ; CHECK-LABEL: define <2 x i1> @fold_fcmp_nondenormal_double_ieee_dynamic_vector_nonsplat(
65 ; CHECK-SAME: ) #[[ATTR0]] {
66 ; CHECK-NEXT: ret <2 x i1> <i1 false, i1 true>
68 %cmp = fcmp une <2 x double> <double 2.0, double 4.0>, <double 2.0, double 8.0>
72 define <3 x i1> @fold_fcmp_nondenormal_double_ieee_dynamic_vector_nonsplat_undef() #0 {
73 ; CHECK-LABEL: define <3 x i1> @fold_fcmp_nondenormal_double_ieee_dynamic_vector_nonsplat_undef(
74 ; CHECK-SAME: ) #[[ATTR0]] {
75 ; CHECK-NEXT: ret <3 x i1> <i1 true, i1 true, i1 false>
77 %cmp = fcmp une <3 x double> <double 2.0, double undef, double 4.0>, <double 1.0, double undef, double 4.0>
81 define <2 x i1> @fold_fcmp_nondenormal_double_ieee_dynamic_zero() #0 {
82 ; CHECK-LABEL: define <2 x i1> @fold_fcmp_nondenormal_double_ieee_dynamic_zero(
83 ; CHECK-SAME: ) #[[ATTR0]] {
84 ; CHECK-NEXT: ret <2 x i1> zeroinitializer
86 %cmp = fcmp une <2 x double> zeroinitializer, zeroinitializer
90 define <2 x i1> @no_fold_fcmp_denormal_double_ieee_dynamic_vector_nonsplat() #0 {
91 ; CHECK-LABEL: define <2 x i1> @no_fold_fcmp_denormal_double_ieee_dynamic_vector_nonsplat(
92 ; CHECK-SAME: ) #[[ATTR0]] {
93 ; CHECK-NEXT: [[CMP:%.*]] = fcmp une <2 x double> <double 0x8000000000000, double 1.000000e+00>, zeroinitializer
94 ; CHECK-NEXT: ret <2 x i1> [[CMP]]
96 %cmp = fcmp une <2 x double> <double 0x8000000000000, double 1.0>, zeroinitializer
100 define <vscale x 2 x i1> @fold_fcmp_nondenormal_double_ieee_dynamic_scalable_vector_splat() #0 {
101 ; CHECK-LABEL: define <vscale x 2 x i1> @fold_fcmp_nondenormal_double_ieee_dynamic_scalable_vector_splat(
102 ; CHECK-SAME: ) #[[ATTR0]] {
103 ; CHECK-NEXT: ret <vscale x 2 x i1> splat (i1 true)
105 %cmp = fcmp une <vscale x 2 x double> splat (double 2.0), zeroinitializer
106 ret <vscale x 2 x i1> %cmp
109 define <vscale x 2 x i1> @no_fold_fcmp_denormal_double_ieee_dynamic_scalaable_vector_splat() #0 {
110 ; CHECK-LABEL: define <vscale x 2 x i1> @no_fold_fcmp_denormal_double_ieee_dynamic_scalaable_vector_splat(
111 ; CHECK-SAME: ) #[[ATTR0]] {
112 ; CHECK-NEXT: ret <vscale x 2 x i1> splat (i1 true)
114 %cmp = fcmp une <vscale x 2 x double> splat (double 0x8000000000000), zeroinitializer
115 ret <vscale x 2 x i1> %cmp
118 attributes #0 = { "denormal-fp-math"="ieee,dynamic" }