Lines Matching full:magic
23 ; CHECK-NEXT: [[MAGIC:%.*]] = select i1 [[SHOULD_SIGNEXT]], i32 [[ALL_BITS_EXCEPT_LOW_NBITS]], i…
28 ; CHECK-NEXT: call void @use32(i32 [[MAGIC]])
36 %magic = select i1 %should_signext, i32 %all_bits_except_low_nbits, i32 0
42 call void @use32(i32 %magic)
44 %signextended = add i32 %high_bits_extracted, %magic
54 ; CHECK-NEXT: [[MAGIC:%.*]] = select i1 [[SHOULD_SIGNEXT]], i32 [[ALL_BITS_EXCEPT_LOW_NBITS]], i…
59 ; CHECK-NEXT: call void @use32(i32 [[MAGIC]])
67 %magic = select i1 %should_signext, i32 %all_bits_except_low_nbits, i32 0
73 call void @use32(i32 %magic)
75 %signextended = or i32 %high_bits_extracted, %magic
85 ; CHECK-NEXT: [[MAGIC:%.*]] = select i1 [[SHOULD_SIGNEXT]], i32 [[HIGHER_BIT_AFTER_SIGNBIT]], i3…
90 ; CHECK-NEXT: call void @use32(i32 [[MAGIC]])
98 %magic = select i1 %should_signext, i32 %higher_bit_after_signbit, i32 0
104 call void @use32(i32 %magic)
106 %signextended = sub i32 %high_bits_extracted, %magic
134 %magic = select i1 %should_signext, i32 %all_bits_except_low_nbits, i32 0 ; one-use
143 %signextended = add i32 %magic, %high_bits_extracted
171 %magic = select i1 %should_signext, i32 %all_bits_except_low_nbits, i32 0 ; one-use
180 %signextended = or i32 %magic, %high_bits_extracted
208 %magic = select i1 %should_signext, i32 %higher_bit_after_signbit, i32 0 ; one-use
217 %signextended = sub i32 %high_bits_extracted, %magic
229 ; CHECK-NEXT: [[MAGIC:%.*]] = select i1 [[SHOULD_SIGNEXT]], i32 [[ALL_BITS_EXCEPT_LOW_NBITS]], i…
234 ; CHECK-NEXT: call void @use32(i32 [[MAGIC]])
242 %magic = select i1 %should_signext, i32 %all_bits_except_low_nbits, i32 0
248 call void @use32(i32 %magic)
250 %signextended = add i32 %high_bits_extracted, %magic
259 ; CHECK-NEXT: [[MAGIC:%.*]] = select i1 [[SHOULD_SIGNEXT]], i32 0, i32 [[ALL_BITS_EXCEPT_LOW_NBI…
264 ; CHECK-NEXT: call void @use32(i32 [[MAGIC]])
272 %magic = select i1 %should_signext, i32 0, i32 %all_bits_except_low_nbits ; swapped
278 call void @use32(i32 %magic)
280 %signextended = add i32 %high_bits_extracted, %magic
289 ; CHECK-NEXT: [[MAGIC:%.*]] = select i1 [[SHOULD_SIGNEXT]], i32 [[ALL_BITS_EXCEPT_LOW_NBITS]], i…
294 ; CHECK-NEXT: call void @use32(i32 [[MAGIC]])
302 %magic = select i1 %should_signext, i32 %all_bits_except_low_nbits, i32 0
308 call void @use32(i32 %magic)
310 %signextended = add i32 %magic, %high_bits_extracted ; swapped
340 %magic = select i1 %should_signext, i32 %all_bits_except_low_nbits, i32 0 ; one-use
349 %signextended = add i32 %magic, %high_bits_extracted
359 ; CHECK-NEXT: [[MAGIC:%.*]] = select i1 [[SHOULD_SIGNEXT]], i32 [[ALL_BITS_EXCEPT_LOW_NBITS]], i…
365 ; CHECK-NEXT: call void @use32(i32 [[MAGIC]])
376 %magic = select i1 %should_signext, i32 %all_bits_except_low_nbits, i32 0 ; has extra use
383 call void @use32(i32 %magic)
385 %signextended = add i32 %magic, %high_bits_extracted
396 ; CHECK-NEXT: [[MAGIC:%.*]] = select i1 [[SHOULD_SIGNEXT]], i32 [[ALL_BITS_EXCEPT_LOW_NBITS]], i…
403 ; CHECK-NEXT: call void @use32(i32 [[MAGIC]])
404 ; CHECK-NEXT: [[SIGNEXTENDED:%.*]] = add i32 [[MAGIC]], [[HIGH_BITS_EXTRACTED]]
413 %magic = select i1 %should_signext, i32 %all_bits_except_low_nbits, i32 0 ; has extra use
421 call void @use32(i32 %magic)
423 %signextended = add i32 %magic, %high_bits_extracted
433 ; CHECK-NEXT: [[MAGIC:%.*]] = select i1 [[SHOULD_SIGNEXT]], i32 [[ALL_BITS_EXCEPT_LOW_NBITS]], i…
438 ; CHECK-NEXT: call void @use32(i32 [[MAGIC]])
446 %magic = select i1 %should_signext, i32 %all_bits_except_low_nbits, i32 0
452 call void @use32(i32 %magic)
454 %signextended = add i32 %high_bits_extracted, %magic
467 ; CHECK-NEXT: [[MAGIC:%.*]] = select i1 [[SHOULD_SIGNEXT]], i32 [[ALL_BITS_EXCEPT_LOW_NBITS]], i…
475 ; CHECK-NEXT: call void @use32(i32 [[MAGIC]])
486 %magic = select i1 %should_signext, i32 %all_bits_except_low_nbits, i32 0
495 call void @use32(i32 %magic)
497 %signextended = add i32 %high_bits_extracted, %magic
509 ; CHECK-NEXT: [[MAGIC:%.*]] = select i1 [[SHOULD_SIGNEXT]], i16 [[ALL_BITS_EXCEPT_LOW_NBITS]], i…
510 ; CHECK-NEXT: [[MAGIC_WIDE:%.*]] = sext i16 [[MAGIC]] to i32
517 ; CHECK-NEXT: call void @use16(i16 [[MAGIC]])
528 %magic = select i1 %should_signext, i16 %all_bits_except_low_nbits, i16 0
529 %magic_wide = sext i16 %magic to i32
537 call void @use16(i16 %magic)
552 ; CHECK-NEXT: [[MAGIC:%.*]] = select i1 [[SHOULD_SIGNEXT]], i16 [[ALL_BITS_EXCEPT_LOW_NBITS]], i…
553 ; CHECK-NEXT: [[MAGIC_WIDE:%.*]] = zext i16 [[MAGIC]] to i32
560 ; CHECK-NEXT: call void @use16(i16 [[MAGIC]])
571 %magic = select i1 %should_signext, i16 %all_bits_except_low_nbits, i16 0
572 %magic_wide = zext i16 %magic to i32
580 call void @use16(i16 %magic)
596 ; CHECK-NEXT: [[MAGIC:%.*]] = select i1 [[SHOULD_SIGNEXT]], i32 [[ALL_BITS_EXCEPT_LOW_NBITS_WIDE…
604 ; CHECK-NEXT: call void @use32(i32 [[MAGIC]])
615 %magic = select i1 %should_signext, i32 %all_bits_except_low_nbits_wide, i32 0
624 call void @use32(i32 %magic)
626 %signextended = add i32 %high_bits_extracted, %magic
639 ; CHECK-NEXT: [[MAGIC:%.*]] = select i1 [[SHOULD_SIGNEXT]], i32 [[ALL_BITS_EXCEPT_LOW_NBITS_WIDE…
647 ; CHECK-NEXT: call void @use32(i32 [[MAGIC]])
658 %magic = select i1 %should_signext, i32 %all_bits_except_low_nbits_wide, i32 0
667 call void @use32(i32 %magic)
669 %signextended = sub i32 %high_bits_extracted, %magic
681 ; CHECK-NEXT: [[MAGIC:%.*]] = select i1 [[SHOULD_SIGNEXT]], i32 [[ALL_BITS_EXCEPT_LOW_NBITS]], i…
686 ; CHECK-NEXT: call void @use32(i32 [[MAGIC]])
687 ; CHECK-NEXT: [[SIGNEXTENDED:%.*]] = add i32 [[HIGH_BITS_EXTRACTED]], [[MAGIC]]
694 %magic = select i1 %should_signext, i32 %all_bits_except_low_nbits, i32 0
700 call void @use32(i32 %magic)
702 %signextended = add i32 %high_bits_extracted, %magic
712 ; CHECK-NEXT: [[MAGIC:%.*]] = select i1 [[SHOULD_SIGNEXT]], i32 [[ALL_BITS_EXCEPT_LOW_NBITS]], i…
717 ; CHECK-NEXT: call void @use32(i32 [[MAGIC]])
718 ; CHECK-NEXT: [[SIGNEXTENDED:%.*]] = add i32 [[HIGH_BITS_EXTRACTED]], [[MAGIC]]
725 %magic = select i1 %should_signext, i32 %all_bits_except_low_nbits, i32 0
731 call void @use32(i32 %magic)
733 %signextended = add i32 %high_bits_extracted, %magic
743 ; CHECK-NEXT: [[MAGIC:%.*]] = select i1 [[SHOULD_SIGNEXT]], i32 0, i32 [[ALL_BITS_EXCEPT_LOW_NBI…
748 ; CHECK-NEXT: call void @use32(i32 [[MAGIC]])
749 ; CHECK-NEXT: [[SIGNEXTENDED:%.*]] = add i32 [[HIGH_BITS_EXTRACTED]], [[MAGIC]]
756 %magic = select i1 %should_signext, i32 0, i32 %all_bits_except_low_nbits ; wrong order
762 call void @use32(i32 %magic)
764 %signextended = add i32 %high_bits_extracted, %magic
774 ; CHECK-NEXT: [[MAGIC:%.*]] = select i1 [[SHOULD_SIGNEXT]], i32 [[ALL_BITS_EXCEPT_LOW_NBITS]], i…
779 ; CHECK-NEXT: call void @use32(i32 [[MAGIC]])
780 ; CHECK-NEXT: [[SIGNEXTENDED:%.*]] = add i32 [[HIGH_BITS_EXTRACTED]], [[MAGIC]]
787 %magic = select i1 %should_signext, i32 %all_bits_except_low_nbits, i32 0
793 call void @use32(i32 %magic)
795 %signextended = add i32 %high_bits_extracted, %magic
805 ; CHECK-NEXT: [[MAGIC:%.*]] = select i1 [[SHOULD_SIGNEXT]], i32 [[ALL_BITS_EXCEPT_LOW_NBITS]], i…
810 ; CHECK-NEXT: call void @use32(i32 [[MAGIC]])
811 ; CHECK-NEXT: [[SIGNEXTENDED:%.*]] = add i32 [[HIGH_BITS_EXTRACTED]], [[MAGIC]]
818 %magic = select i1 %should_signext, i32 %all_bits_except_low_nbits, i32 0
824 call void @use32(i32 %magic)
826 %signextended = add i32 %high_bits_extracted, %magic
836 ; CHECK-NEXT: [[MAGIC:%.*]] = select i1 [[SHOULD_SIGNEXT]], i32 [[ALL_BITS_EXCEPT_LOW_NBITS]], i…
841 ; CHECK-NEXT: call void @use32(i32 [[MAGIC]])
842 ; CHECK-NEXT: [[SIGNEXTENDED:%.*]] = add i32 [[HIGH_BITS_EXTRACTED]], [[MAGIC]]
849 %magic = select i1 %should_signext, i32 %all_bits_except_low_nbits, i32 0
855 call void @use32(i32 %magic)
857 %signextended = add i32 %high_bits_extracted, %magic
869 ; CHECK-NEXT: [[MAGIC:%.*]] = select i1 [[SHOULD_SIGNEXT]], i32 [[ALL_BITS_EXCEPT_LOW_NBITS]], i…
876 ; CHECK-NEXT: call void @use32(i32 [[MAGIC]])
877 ; CHECK-NEXT: [[SIGNEXTENDED:%.*]] = add i32 [[MAGIC]], [[HIGH_BITS_EXTRACTED]]
886 %magic = select i1 %should_signext, i32 %all_bits_except_low_nbits, i32 0
894 call void @use32(i32 %magic)
896 %signextended = add i32 %magic, %high_bits_extracted
906 ; CHECK-NEXT: [[MAGIC:%.*]] = select i1 [[SHOULD_SIGNEXT]], i32 [[ALL_BITS_EXCEPT_LOW_NBITS]], i…
911 ; CHECK-NEXT: call void @use32(i32 [[MAGIC]])
912 ; CHECK-NEXT: [[SIGNEXTENDED:%.*]] = add i32 [[HIGH_BITS_EXTRACTED]], [[MAGIC]]
919 %magic = select i1 %should_signext, i32 %all_bits_except_low_nbits, i32 0
925 call void @use32(i32 %magic)
927 %signextended = add i32 %high_bits_extracted, %magic
937 ; CHECK-NEXT: [[MAGIC:%.*]] = select i1 [[SHOULD_SIGNEXT]], i32 [[HIGHER_BIT_AFTER_SIGNBIT]], i3…
942 ; CHECK-NEXT: call void @use32(i32 [[MAGIC]])
943 ; CHECK-NEXT: [[SIGNEXTENDED:%.*]] = sub i32 [[MAGIC]], [[HIGH_BITS_EXTRACTED]]
950 %magic = select i1 %should_signext, i32 %higher_bit_after_signbit, i32 0
956 call void @use32(i32 %magic)
958 %signextended = sub i32 %magic, %high_bits_extracted ; wrong order; `sub` is not commutative
968 ; CHECK-NEXT: [[MAGIC:%.*]] = select i1 [[SHOULD_SIGNEXT]], i32 [[HIGHER_BIT_AFTER_SIGNBIT]], i3…
973 ; CHECK-NEXT: call void @use32(i32 [[MAGIC]])
974 ; CHECK-NEXT: [[SIGNEXTENDED:%.*]] = sub i32 [[HIGH_BITS_EXTRACTED]], [[MAGIC]]
981 %magic = select i1 %should_signext, i32 %higher_bit_after_signbit, i32 0
987 call void @use32(i32 %magic)
989 %signextended = sub i32 %high_bits_extracted, %magic
999 ; CHECK-NEXT: [[MAGIC:%.*]] = select i1 [[SHOULD_SIGNEXT]], i32 [[ALL_BITS_EXCEPT_LOW_NBITS]], i…
1004 ; CHECK-NEXT: call void @use32(i32 [[MAGIC]])
1005 ; CHECK-NEXT: [[SIGNEXTENDED:%.*]] = add i32 [[HIGH_BITS_EXTRACTED]], [[MAGIC]]
1012 %magic = select i1 %should_signext, i32 %all_bits_except_low_nbits, i32 -1 ; not 0
1018 call void @use32(i32 %magic)
1020 %signextended = add i32 %high_bits_extracted, %magic
1032 ; CHECK-NEXT: [[MAGIC:%.*]] = select i1 [[SHOULD_SIGNEXT]], i16 [[ALL_BITS_EXCEPT_LOW_NBITS]], i…
1033 ; CHECK-NEXT: [[MAGIC_WIDE:%.*]] = zext i16 [[MAGIC]] to i32
1040 ; CHECK-NEXT: call void @use16(i16 [[MAGIC]])
1051 %magic = select i1 %should_signext, i16 %all_bits_except_low_nbits, i16 0
1052 %magic_wide = zext i16 %magic to i32 ; not sext
1060 call void @use16(i16 %magic)
1075 ; CHECK-NEXT: [[MAGIC:%.*]] = select i1 [[SHOULD_SIGNEXT]], i16 [[ALL_BITS_EXCEPT_LOW_NBITS]], i…
1076 ; CHECK-NEXT: [[MAGIC_WIDE:%.*]] = sext i16 [[MAGIC]] to i32
1083 ; CHECK-NEXT: call void @use16(i16 [[MAGIC]])
1094 %magic = select i1 %should_signext, i16 %all_bits_except_low_nbits, i16 0
1095 %magic_wide = sext i16 %magic to i32 ; not zext
1103 call void @use16(i16 %magic)
1116 ; CHECK-NEXT: [[MAGIC:%.*]] = select i1 [[SHOULD_SIGNEXT]], i32 [[ALL_BITS_EXCEPT_LOW_NBITS]], i…
1121 ; CHECK-NEXT: call void @use32(i32 [[MAGIC]])
1122 ; CHECK-NEXT: [[SIGNEXTENDED:%.*]] = or i32 [[HIGH_BITS_EXTRACTED]], [[MAGIC]]
1129 %magic = select i1 %should_signext, i32 %all_bits_except_low_nbits, i32 0
1135 call void @use32(i32 %magic)
1137 %signextended = or i32 %high_bits_extracted, %magic