570 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py2; RUN: opt -S -passes=instcombine < %s | FileCheck %s3 4define i1 @i32_cast_cmp_oeq_int_0_uitofp(i32 %i) {5; CHECK-LABEL: @i32_cast_cmp_oeq_int_0_uitofp(6; CHECK-NEXT: [[CMP:%.*]] = icmp eq i32 [[I:%.*]], 07; CHECK-NEXT: ret i1 [[CMP]]8;9 %f = uitofp i32 %i to float10 %cmp = fcmp oeq float %f, 0.011 ret i1 %cmp12}13 14define i1 @i32_cast_cmp_oeq_int_n0_uitofp(i32 %i) {15; CHECK-LABEL: @i32_cast_cmp_oeq_int_n0_uitofp(16; CHECK-NEXT: [[CMP:%.*]] = icmp eq i32 [[I:%.*]], 017; CHECK-NEXT: ret i1 [[CMP]]18;19 %f = uitofp i32 %i to float20 %cmp = fcmp oeq float %f, -0.021 ret i1 %cmp22}23 24define i1 @i32_cast_cmp_oeq_int_0_sitofp(i32 %i) {25; CHECK-LABEL: @i32_cast_cmp_oeq_int_0_sitofp(26; CHECK-NEXT: [[CMP:%.*]] = icmp eq i32 [[I:%.*]], 027; CHECK-NEXT: ret i1 [[CMP]]28;29 %f = sitofp i32 %i to float30 %cmp = fcmp oeq float %f, 0.031 ret i1 %cmp32}33 34define i1 @i32_cast_cmp_oeq_int_n0_sitofp(i32 %i) {35; CHECK-LABEL: @i32_cast_cmp_oeq_int_n0_sitofp(36; CHECK-NEXT: [[CMP:%.*]] = icmp eq i32 [[I:%.*]], 037; CHECK-NEXT: ret i1 [[CMP]]38;39 %f = sitofp i32 %i to float40 %cmp = fcmp oeq float %f, -0.041 ret i1 %cmp42}43 44define i1 @i32_cast_cmp_one_int_0_uitofp(i32 %i) {45; CHECK-LABEL: @i32_cast_cmp_one_int_0_uitofp(46; CHECK-NEXT: [[CMP:%.*]] = icmp ne i32 [[I:%.*]], 047; CHECK-NEXT: ret i1 [[CMP]]48;49 %f = uitofp i32 %i to float50 %cmp = fcmp one float %f, 0.051 ret i1 %cmp52}53 54define i1 @i32_cast_cmp_one_int_n0_uitofp(i32 %i) {55; CHECK-LABEL: @i32_cast_cmp_one_int_n0_uitofp(56; CHECK-NEXT: [[CMP:%.*]] = icmp ne i32 [[I:%.*]], 057; CHECK-NEXT: ret i1 [[CMP]]58;59 %f = uitofp i32 %i to float60 %cmp = fcmp one float %f, -0.061 ret i1 %cmp62}63 64define i1 @i32_cast_cmp_one_int_0_sitofp(i32 %i) {65; CHECK-LABEL: @i32_cast_cmp_one_int_0_sitofp(66; CHECK-NEXT: [[CMP:%.*]] = icmp ne i32 [[I:%.*]], 067; CHECK-NEXT: ret i1 [[CMP]]68;69 %f = sitofp i32 %i to float70 %cmp = fcmp one float %f, 0.071 ret i1 %cmp72}73 74define i1 @i32_cast_cmp_one_int_n0_sitofp(i32 %i) {75; CHECK-LABEL: @i32_cast_cmp_one_int_n0_sitofp(76; CHECK-NEXT: [[CMP:%.*]] = icmp ne i32 [[I:%.*]], 077; CHECK-NEXT: ret i1 [[CMP]]78;79 %f = sitofp i32 %i to float80 %cmp = fcmp one float %f, -0.081 ret i1 %cmp82}83 84define i1 @i32_cast_cmp_ueq_int_0_uitofp(i32 %i) {85; CHECK-LABEL: @i32_cast_cmp_ueq_int_0_uitofp(86; CHECK-NEXT: [[CMP:%.*]] = icmp eq i32 [[I:%.*]], 087; CHECK-NEXT: ret i1 [[CMP]]88;89 %f = uitofp i32 %i to float90 %cmp = fcmp ueq float %f, 0.091 ret i1 %cmp92}93 94define i1 @i32_cast_cmp_ueq_int_n0_uitofp(i32 %i) {95; CHECK-LABEL: @i32_cast_cmp_ueq_int_n0_uitofp(96; CHECK-NEXT: [[CMP:%.*]] = icmp eq i32 [[I:%.*]], 097; CHECK-NEXT: ret i1 [[CMP]]98;99 %f = uitofp i32 %i to float100 %cmp = fcmp ueq float %f, -0.0101 ret i1 %cmp102}103 104define i1 @i32_cast_cmp_ueq_int_0_sitofp(i32 %i) {105; CHECK-LABEL: @i32_cast_cmp_ueq_int_0_sitofp(106; CHECK-NEXT: [[CMP:%.*]] = icmp eq i32 [[I:%.*]], 0107; CHECK-NEXT: ret i1 [[CMP]]108;109 %f = sitofp i32 %i to float110 %cmp = fcmp ueq float %f, 0.0111 ret i1 %cmp112}113 114define i1 @i32_cast_cmp_ueq_int_n0_sitofp(i32 %i) {115; CHECK-LABEL: @i32_cast_cmp_ueq_int_n0_sitofp(116; CHECK-NEXT: [[CMP:%.*]] = icmp eq i32 [[I:%.*]], 0117; CHECK-NEXT: ret i1 [[CMP]]118;119 %f = sitofp i32 %i to float120 %cmp = fcmp ueq float %f, -0.0121 ret i1 %cmp122}123 124define i1 @i32_cast_cmp_une_int_0_uitofp(i32 %i) {125; CHECK-LABEL: @i32_cast_cmp_une_int_0_uitofp(126; CHECK-NEXT: [[CMP:%.*]] = icmp ne i32 [[I:%.*]], 0127; CHECK-NEXT: ret i1 [[CMP]]128;129 %f = uitofp i32 %i to float130 %cmp = fcmp une float %f, 0.0131 ret i1 %cmp132}133 134define i1 @i32_cast_cmp_une_int_n0_uitofp(i32 %i) {135; CHECK-LABEL: @i32_cast_cmp_une_int_n0_uitofp(136; CHECK-NEXT: [[CMP:%.*]] = icmp ne i32 [[I:%.*]], 0137; CHECK-NEXT: ret i1 [[CMP]]138;139 %f = uitofp i32 %i to float140 %cmp = fcmp une float %f, -0.0141 ret i1 %cmp142}143 144define i1 @i32_cast_cmp_une_int_0_sitofp(i32 %i) {145; CHECK-LABEL: @i32_cast_cmp_une_int_0_sitofp(146; CHECK-NEXT: [[CMP:%.*]] = icmp ne i32 [[I:%.*]], 0147; CHECK-NEXT: ret i1 [[CMP]]148;149 %f = sitofp i32 %i to float150 %cmp = fcmp une float %f, 0.0151 ret i1 %cmp152}153 154define i1 @i32_cast_cmp_une_int_n0_sitofp(i32 %i) {155; CHECK-LABEL: @i32_cast_cmp_une_int_n0_sitofp(156; CHECK-NEXT: [[CMP:%.*]] = icmp ne i32 [[I:%.*]], 0157; CHECK-NEXT: ret i1 [[CMP]]158;159 %f = sitofp i32 %i to float160 %cmp = fcmp une float %f, -0.0161 ret i1 %cmp162}163 164define i1 @i32_cast_cmp_ogt_int_0_uitofp(i32 %i) {165; CHECK-LABEL: @i32_cast_cmp_ogt_int_0_uitofp(166; CHECK-NEXT: [[CMP:%.*]] = icmp ne i32 [[I:%.*]], 0167; CHECK-NEXT: ret i1 [[CMP]]168;169 %f = uitofp i32 %i to float170 %cmp = fcmp ogt float %f, 0.0171 ret i1 %cmp172}173 174define i1 @i32_cast_cmp_ogt_int_n0_uitofp(i32 %i) {175; CHECK-LABEL: @i32_cast_cmp_ogt_int_n0_uitofp(176; CHECK-NEXT: [[CMP:%.*]] = icmp ne i32 [[I:%.*]], 0177; CHECK-NEXT: ret i1 [[CMP]]178;179 %f = uitofp i32 %i to float180 %cmp = fcmp ogt float %f, -0.0181 ret i1 %cmp182}183 184define i1 @i32_cast_cmp_ogt_int_0_sitofp(i32 %i) {185; CHECK-LABEL: @i32_cast_cmp_ogt_int_0_sitofp(186; CHECK-NEXT: [[CMP:%.*]] = icmp sgt i32 [[I:%.*]], 0187; CHECK-NEXT: ret i1 [[CMP]]188;189 %f = sitofp i32 %i to float190 %cmp = fcmp ogt float %f, 0.0191 ret i1 %cmp192}193 194define i1 @i32_cast_cmp_ogt_int_n0_sitofp(i32 %i) {195; CHECK-LABEL: @i32_cast_cmp_ogt_int_n0_sitofp(196; CHECK-NEXT: [[CMP:%.*]] = icmp sgt i32 [[I:%.*]], 0197; CHECK-NEXT: ret i1 [[CMP]]198;199 %f = sitofp i32 %i to float200 %cmp = fcmp ogt float %f, -0.0201 ret i1 %cmp202}203 204define i1 @i32_cast_cmp_ole_int_0_uitofp(i32 %i) {205; CHECK-LABEL: @i32_cast_cmp_ole_int_0_uitofp(206; CHECK-NEXT: [[CMP:%.*]] = icmp eq i32 [[I:%.*]], 0207; CHECK-NEXT: ret i1 [[CMP]]208;209 %f = uitofp i32 %i to float210 %cmp = fcmp ole float %f, 0.0211 ret i1 %cmp212}213 214define i1 @i32_cast_cmp_ole_int_0_sitofp(i32 %i) {215; CHECK-LABEL: @i32_cast_cmp_ole_int_0_sitofp(216; CHECK-NEXT: [[CMP:%.*]] = icmp slt i32 [[I:%.*]], 1217; CHECK-NEXT: ret i1 [[CMP]]218;219 %f = sitofp i32 %i to float220 %cmp = fcmp ole float %f, 0.0221 ret i1 %cmp222}223 224define i1 @i32_cast_cmp_olt_int_0_sitofp(i32 %i) {225; CHECK-LABEL: @i32_cast_cmp_olt_int_0_sitofp(226; CHECK-NEXT: [[CMP:%.*]] = icmp slt i32 [[I:%.*]], 0227; CHECK-NEXT: ret i1 [[CMP]]228;229 %f = sitofp i32 %i to float230 %cmp = fcmp olt float %f, 0.0231 ret i1 %cmp232}233 234define i1 @i64_cast_cmp_oeq_int_0_uitofp(i64 %i) {235; CHECK-LABEL: @i64_cast_cmp_oeq_int_0_uitofp(236; CHECK-NEXT: [[CMP:%.*]] = icmp eq i64 [[I:%.*]], 0237; CHECK-NEXT: ret i1 [[CMP]]238;239 %f = uitofp i64 %i to float240 %cmp = fcmp oeq float %f, 0.0241 ret i1 %cmp242}243 244define i1 @i64_cast_cmp_oeq_int_0_sitofp(i64 %i) {245; CHECK-LABEL: @i64_cast_cmp_oeq_int_0_sitofp(246; CHECK-NEXT: [[CMP:%.*]] = icmp eq i64 [[I:%.*]], 0247; CHECK-NEXT: ret i1 [[CMP]]248;249 %f = sitofp i64 %i to float250 %cmp = fcmp oeq float %f, 0.0251 ret i1 %cmp252}253 254define i1 @i64_cast_cmp_oeq_int_0_uitofp_half(i64 %i) {255; CHECK-LABEL: @i64_cast_cmp_oeq_int_0_uitofp_half(256; CHECK-NEXT: [[CMP:%.*]] = icmp eq i64 [[I:%.*]], 0257; CHECK-NEXT: ret i1 [[CMP]]258;259 %f = uitofp i64 %i to half260 %cmp = fcmp oeq half %f, 0.0261 ret i1 %cmp262}263 264define i1 @i64_cast_cmp_oeq_int_0_sitofp_half(i64 %i) {265; CHECK-LABEL: @i64_cast_cmp_oeq_int_0_sitofp_half(266; CHECK-NEXT: [[CMP:%.*]] = icmp eq i64 [[I:%.*]], 0267; CHECK-NEXT: ret i1 [[CMP]]268;269 %f = sitofp i64 %i to half270 %cmp = fcmp oeq half %f, 0.0271 ret i1 %cmp272}273 274define i1 @i32_cast_cmp_oeq_int_0_uitofp_ppcf128(i32 %i) {275; CHECK-LABEL: @i32_cast_cmp_oeq_int_0_uitofp_ppcf128(276; CHECK-NEXT: [[F:%.*]] = uitofp i32 [[I:%.*]] to ppc_fp128277; CHECK-NEXT: [[CMP:%.*]] = fcmp oeq ppc_fp128 [[F]], 0xM00000000000000000000000000000000278; CHECK-NEXT: ret i1 [[CMP]]279;280 %f = uitofp i32 %i to ppc_fp128281 %cmp = fcmp oeq ppc_fp128 %f, 0xM00000000000000000000000000000000282 ret i1 %cmp283}284 285; Since 0xFFFFFF fits in a float, and one less and286; one more than it also fits without rounding, the287; test can be optimized to an integer compare.288 289define i1 @i32_cast_cmp_oeq_int_i24max_uitofp(i32 %i) {290; CHECK-LABEL: @i32_cast_cmp_oeq_int_i24max_uitofp(291; CHECK-NEXT: [[CMP:%.*]] = icmp eq i32 [[I:%.*]], 16777215292; CHECK-NEXT: ret i1 [[CMP]]293;294 %f = uitofp i32 %i to float295 %cmp = fcmp oeq float %f, 0x416FFFFFE0000000296 ret i1 %cmp297}298 299define i1 @i32_cast_cmp_oeq_int_i24max_sitofp(i32 %i) {300; CHECK-LABEL: @i32_cast_cmp_oeq_int_i24max_sitofp(301; CHECK-NEXT: [[CMP:%.*]] = icmp eq i32 [[I:%.*]], 16777215302; CHECK-NEXT: ret i1 [[CMP]]303;304 %f = sitofp i32 %i to float305 %cmp = fcmp oeq float %f, 0x416FFFFFE0000000306 ret i1 %cmp307}308 309; Though 0x1000000 fits in a float, one more than it310; would round to it too, hence a single integer comparison311; does not suffice.312 313 314define i1 @i32_cast_cmp_oeq_int_i24maxp1_uitofp(i32 %i) {315; CHECK-LABEL: @i32_cast_cmp_oeq_int_i24maxp1_uitofp(316; CHECK-NEXT: [[F:%.*]] = uitofp i32 [[I:%.*]] to float317; CHECK-NEXT: [[CMP:%.*]] = fcmp oeq float [[F]], 0x4170000000000000318; CHECK-NEXT: ret i1 [[CMP]]319;320 %f = uitofp i32 %i to float321 %cmp = fcmp oeq float %f, 0x4170000000000000322 ret i1 %cmp323}324 325 326define i1 @i32_cast_cmp_oeq_int_i24maxp1_sitofp(i32 %i) {327; CHECK-LABEL: @i32_cast_cmp_oeq_int_i24maxp1_sitofp(328; CHECK-NEXT: [[F:%.*]] = sitofp i32 [[I:%.*]] to float329; CHECK-NEXT: [[CMP:%.*]] = fcmp oeq float [[F]], 0x4170000000000000330; CHECK-NEXT: ret i1 [[CMP]]331;332 %f = sitofp i32 %i to float333 %cmp = fcmp oeq float %f, 0x4170000000000000334 ret i1 %cmp335}336 337define i1 @i32_cast_cmp_oeq_int_i32umax_uitofp(i32 %i) {338; CHECK-LABEL: @i32_cast_cmp_oeq_int_i32umax_uitofp(339; CHECK-NEXT: [[F:%.*]] = uitofp i32 [[I:%.*]] to float340; CHECK-NEXT: [[CMP:%.*]] = fcmp oeq float [[F]], 0x41F0000000000000341; CHECK-NEXT: ret i1 [[CMP]]342;343 %f = uitofp i32 %i to float344 %cmp = fcmp oeq float %f, 0x41F0000000000000345 ret i1 %cmp346}347 348; 32-bit unsigned integer cannot possibly round up to 1<<33349define i1 @i32_cast_cmp_oeq_int_big_uitofp(i32 %i) {350; CHECK-LABEL: @i32_cast_cmp_oeq_int_big_uitofp(351; CHECK-NEXT: ret i1 false352;353 %f = uitofp i32 %i to float354 %cmp = fcmp oeq float %f, 0x4200000000000000355 ret i1 %cmp356}357 358; 32-bit signed integer cannot possibly round up to 1<<32359define i1 @i32_cast_cmp_oeq_int_i32umax_sitofp(i32 %i) {360; CHECK-LABEL: @i32_cast_cmp_oeq_int_i32umax_sitofp(361; CHECK-NEXT: ret i1 false362;363 %f = sitofp i32 %i to float364 %cmp = fcmp oeq float %f, 0x41F0000000000000365 ret i1 %cmp366}367 368define i1 @i32_cast_cmp_oeq_int_i32imin_sitofp(i32 %i) {369; CHECK-LABEL: @i32_cast_cmp_oeq_int_i32imin_sitofp(370; CHECK-NEXT: [[F:%.*]] = sitofp i32 [[I:%.*]] to float371; CHECK-NEXT: [[CMP:%.*]] = fcmp oeq float [[F]], 0xC1E0000000000000372; CHECK-NEXT: ret i1 [[CMP]]373;374 %f = sitofp i32 %i to float375 %cmp = fcmp oeq float %f, 0xC1E0000000000000376 ret i1 %cmp377}378 379define i1 @i32_cast_cmp_oeq_int_i32imax_uitofp(i32 %i) {380; CHECK-LABEL: @i32_cast_cmp_oeq_int_i32imax_uitofp(381; CHECK-NEXT: [[F:%.*]] = uitofp i32 [[I:%.*]] to float382; CHECK-NEXT: [[CMP:%.*]] = fcmp oeq float [[F]], 0x41E0000000000000383; CHECK-NEXT: ret i1 [[CMP]]384;385 %f = uitofp i32 %i to float386 %cmp = fcmp oeq float %f, 0x41E0000000000000387 ret i1 %cmp388}389 390define i1 @i32_cast_cmp_oeq_int_i32imax_sitofp(i32 %i) {391; CHECK-LABEL: @i32_cast_cmp_oeq_int_i32imax_sitofp(392; CHECK-NEXT: [[F:%.*]] = sitofp i32 [[I:%.*]] to float393; CHECK-NEXT: [[CMP:%.*]] = fcmp oeq float [[F]], 0x41E0000000000000394; CHECK-NEXT: ret i1 [[CMP]]395;396 %f = sitofp i32 %i to float397 %cmp = fcmp oeq float %f, 0x41E0000000000000398 ret i1 %cmp399}400 401; 32-bit signed integer cannot possibly round to -1<<32402define i1 @i32_cast_cmp_oeq_int_negi32umax_sitofp(i32 %i) {403; CHECK-LABEL: @i32_cast_cmp_oeq_int_negi32umax_sitofp(404; CHECK-NEXT: ret i1 false405;406 %f = sitofp i32 %i to float407 %cmp = fcmp oeq float %f, 0xC1F0000000000000408 ret i1 %cmp409}410 411define i1 @i32_cast_cmp_oeq_half_uitofp(i32 %i) {412; CHECK-LABEL: @i32_cast_cmp_oeq_half_uitofp(413; CHECK-NEXT: ret i1 false414;415 %f = uitofp i32 %i to float416 %cmp = fcmp oeq float %f, 0.5417 ret i1 %cmp418}419 420define i1 @i32_cast_cmp_oeq_half_sitofp(i32 %i) {421; CHECK-LABEL: @i32_cast_cmp_oeq_half_sitofp(422; CHECK-NEXT: ret i1 false423;424 %f = sitofp i32 %i to float425 %cmp = fcmp oeq float %f, 0.5426 ret i1 %cmp427}428 429define i1 @i32_cast_cmp_one_half_uitofp(i32 %i) {430; CHECK-LABEL: @i32_cast_cmp_one_half_uitofp(431; CHECK-NEXT: ret i1 true432;433 %f = uitofp i32 %i to float434 %cmp = fcmp one float %f, 0.5435 ret i1 %cmp436}437 438define i1 @i32_cast_cmp_one_half_sitofp(i32 %i) {439; CHECK-LABEL: @i32_cast_cmp_one_half_sitofp(440; CHECK-NEXT: ret i1 true441;442 %f = sitofp i32 %i to float443 %cmp = fcmp one float %f, 0.5444 ret i1 %cmp445}446 447define i1 @i32_cast_cmp_ueq_half_uitofp(i32 %i) {448; CHECK-LABEL: @i32_cast_cmp_ueq_half_uitofp(449; CHECK-NEXT: ret i1 false450;451 %f = uitofp i32 %i to float452 %cmp = fcmp ueq float %f, 0.5453 ret i1 %cmp454}455 456define i1 @i32_cast_cmp_ueq_half_sitofp(i32 %i) {457; CHECK-LABEL: @i32_cast_cmp_ueq_half_sitofp(458; CHECK-NEXT: ret i1 false459;460 %f = sitofp i32 %i to float461 %cmp = fcmp ueq float %f, 0.5462 ret i1 %cmp463}464 465define i1 @i32_cast_cmp_une_half_uitofp(i32 %i) {466; CHECK-LABEL: @i32_cast_cmp_une_half_uitofp(467; CHECK-NEXT: ret i1 true468;469 %f = uitofp i32 %i to float470 %cmp = fcmp une float %f, 0.5471 ret i1 %cmp472}473 474define i1 @i32_cast_cmp_une_half_sitofp(i32 %i) {475; CHECK-LABEL: @i32_cast_cmp_une_half_sitofp(476; CHECK-NEXT: ret i1 true477;478 %f = sitofp i32 %i to float479 %cmp = fcmp une float %f, 0.5480 ret i1 %cmp481}482 483define i1 @i32_cast_cmp_oeq_int_inf_uitofp(i32 %i) {484; CHECK-LABEL: @i32_cast_cmp_oeq_int_inf_uitofp(485; CHECK-NEXT: ret i1 false486;487 %f = uitofp i32 %i to float488 %cmp = fcmp oeq float %f, 0x7FF0000000000000489 ret i1 %cmp490}491 492define i1 @i32_cast_cmp_oeq_int_inf_sitofp(i32 %i) {493; CHECK-LABEL: @i32_cast_cmp_oeq_int_inf_sitofp(494; CHECK-NEXT: ret i1 false495;496 %f = sitofp i32 %i to float497 %cmp = fcmp oeq float %f, 0x7FF0000000000000498 ret i1 %cmp499}500 501; An i128 could round to an IEEE single-precision infinity.502define i1 @i128_cast_cmp_oeq_int_inf_uitofp(i128 %i) {503; CHECK-LABEL: @i128_cast_cmp_oeq_int_inf_uitofp(504; CHECK-NEXT: [[F:%.*]] = uitofp i128 [[I:%.*]] to float505; CHECK-NEXT: [[CMP:%.*]] = fcmp oeq float [[F]], 0x7FF0000000000000506; CHECK-NEXT: ret i1 [[CMP]]507;508 %f = uitofp i128 %i to float509 %cmp = fcmp oeq float %f, 0x7FF0000000000000510 ret i1 %cmp511}512 513define <2 x i1> @i32_vec_cast_cmp_oeq_vec_int_0_sitofp(<2 x i32> %i) {514; CHECK-LABEL: @i32_vec_cast_cmp_oeq_vec_int_0_sitofp(515; CHECK-NEXT: [[CMP:%.*]] = icmp eq <2 x i32> [[I:%.*]], zeroinitializer516; CHECK-NEXT: ret <2 x i1> [[CMP]]517;518 %f = sitofp <2 x i32> %i to <2 x float>519 %cmp = fcmp oeq <2 x float> %f, <float 0.0, float 0.0>520 ret <2 x i1> %cmp521}522 523define <2 x i1> @i32_vec_cast_cmp_oeq_vec_int_n0_sitofp(<2 x i32> %i) {524; CHECK-LABEL: @i32_vec_cast_cmp_oeq_vec_int_n0_sitofp(525; CHECK-NEXT: [[CMP:%.*]] = icmp eq <2 x i32> [[I:%.*]], zeroinitializer526; CHECK-NEXT: ret <2 x i1> [[CMP]]527;528 %f = sitofp <2 x i32> %i to <2 x float>529 %cmp = fcmp oeq <2 x float> %f, <float -0.0, float -0.0>530 ret <2 x i1> %cmp531}532 533define <2 x i1> @i32_vec_cast_cmp_oeq_vec_int_i32imax_sitofp(<2 x i32> %i) {534; CHECK-LABEL: @i32_vec_cast_cmp_oeq_vec_int_i32imax_sitofp(535; CHECK-NEXT: [[F:%.*]] = sitofp <2 x i32> [[I:%.*]] to <2 x float>536; CHECK-NEXT: [[CMP:%.*]] = fcmp oeq <2 x float> [[F]], splat (float 0x41E0000000000000)537; CHECK-NEXT: ret <2 x i1> [[CMP]]538;539 %f = sitofp <2 x i32> %i to <2 x float>540 %cmp = fcmp oeq <2 x float> %f, <float 0x41E0000000000000, float 0x41E0000000000000>541 ret <2 x i1> %cmp542}543 544define <2 x i1> @i32_vec_cast_cmp_oeq_vec_int_negi32umax_sitofp(<2 x i32> %i) {545; CHECK-LABEL: @i32_vec_cast_cmp_oeq_vec_int_negi32umax_sitofp(546; CHECK-NEXT: ret <2 x i1> zeroinitializer547;548 %f = sitofp <2 x i32> %i to <2 x float>549 %cmp = fcmp oeq <2 x float> %f, <float 0xC1F0000000000000, float 0xC1F0000000000000>550 ret <2 x i1> %cmp551}552 553define <2 x i1> @i32_vec_cast_cmp_oeq_vec_half_sitofp(<2 x i32> %i) {554; CHECK-LABEL: @i32_vec_cast_cmp_oeq_vec_half_sitofp(555; CHECK-NEXT: ret <2 x i1> zeroinitializer556;557 %f = sitofp <2 x i32> %i to <2 x float>558 %cmp = fcmp oeq <2 x float> %f, <float 0.5, float 0.5>559 ret <2 x i1> %cmp560}561 562define <2 x i1> @i32_vec_cast_cmp_oeq_vec_int_inf_sitofp(<2 x i32> %i) {563; CHECK-LABEL: @i32_vec_cast_cmp_oeq_vec_int_inf_sitofp(564; CHECK-NEXT: ret <2 x i1> zeroinitializer565;566 %f = sitofp <2 x i32> %i to <2 x float>567 %cmp = fcmp oeq <2 x float> %f, <float 0x7FF0000000000000, float 0x7FF0000000000000>568 ret <2 x i1> %cmp569}570