File tree Expand file tree Collapse file tree 2 files changed +23
-1
lines changed
test/Transforms/SLPVectorizer Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -13995,7 +13995,7 @@ bool BoUpSLP::collectValuesToDemote(
1399513995 if (MultiNodeScalars.contains(V))
1399613996 return false;
1399713997 uint32_t OrigBitWidth = DL->getTypeSizeInBits(V->getType());
13998- if (OrigBitWidth < BitWidth) {
13998+ if (OrigBitWidth > BitWidth) {
1399913999 APInt Mask = APInt::getBitsSetFrom(OrigBitWidth, BitWidth);
1400014000 if (MaskedValueIsZero(V, Mask, SimplifyQuery(*DL)))
1400114001 return true;
Original file line number Diff line number Diff line change 1+ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 4
2+ ; RUN: opt -S --passes=slp-vectorizer < %s | FileCheck %s
3+
4+ define i32 @test (i4 %0 ) {
5+ ; CHECK-LABEL: define i32 @test(
6+ ; CHECK-SAME: i4 [[TMP0:%.*]]) {
7+ ; CHECK-NEXT: entry:
8+ ; CHECK-NEXT: [[TMP1:%.*]] = trunc i8 0 to i4
9+ ; CHECK-NEXT: [[TMP2:%.*]] = trunc i8 0 to i4
10+ ; CHECK-NEXT: [[ADD_R:%.*]] = or i4 [[TMP1]], [[TMP0]]
11+ ; CHECK-NEXT: [[ADD_R14:%.*]] = or i4 0, [[TMP2]]
12+ ; CHECK-NEXT: [[CMP_NOT:%.*]] = icmp eq i4 [[ADD_R]], [[ADD_R14]]
13+ ; CHECK-NEXT: ret i32 0
14+ ;
15+ entry:
16+ %1 = trunc i8 0 to i4
17+ %2 = trunc i8 0 to i4
18+ %add.r = or i4 %1 , %0
19+ %add.r14 = or i4 0 , %2
20+ %cmp.not = icmp eq i4 %add.r , %add.r14
21+ ret i32 0
22+ }
You can’t perform that action at this time.
0 commit comments