Skip to content

Commit 6147501

Browse files
committed
[InstSimplify] Add a test for folding comparison with a undef vector (NFC)
This is to fix https://reviews.llvm.org/D93990#2666922
1 parent 732a90d commit 6147501

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

llvm/test/Transforms/InstSimplify/icmp-constant.ll

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1065,3 +1065,13 @@ bb3:
10651065
%m = mul nuw i8 %x, 0
10661066
br label %bb2
10671067
}
1068+
1069+
1070+
define <2 x i1> @heterogeneous_constvector(<2 x i8> %x) {
1071+
; CHECK-LABEL: @heterogeneous_constvector(
1072+
; CHECK-NEXT: [[C:%.*]] = icmp ult <2 x i8> [[X:%.*]], <i8 undef, i8 poison>
1073+
; CHECK-NEXT: ret <2 x i1> [[C]]
1074+
;
1075+
%c = icmp ult <2 x i8> %x, <i8 undef, i8 poison>
1076+
ret <2 x i1> %c
1077+
}

0 commit comments

Comments
 (0)