We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 92b0752 commit 3836559Copy full SHA for 3836559
llvm/test/Transforms/InstCombine/select-icmp-and.ll
@@ -900,3 +900,15 @@ define i8 @neg_select_trunc_bittest_to_shl_extra_use(i8 %x) {
900
%ret = select i1 %trunc, i8 4, i8 0
901
ret i8 %ret
902
}
903
+
904
+define i16 @select_trunc_nuw_bittest_or(i8 %x) {
905
+; CHECK-LABEL: @select_trunc_nuw_bittest_or(
906
+; CHECK-NEXT: [[TMP1:%.*]] = trunc nuw i8 [[X:%.*]] to i1
907
+; CHECK-NEXT: [[RES:%.*]] = select i1 [[TMP1]], i16 20, i16 4
908
+; CHECK-NEXT: ret i16 [[RES]]
909
+;
910
+ %trunc = trunc nuw i8 %x to i1
911
+ %select = select i1 %trunc, i16 16, i16 0
912
+ %res = or i16 4, %select
913
+ ret i16 %res
914
+}
0 commit comments