forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SLP]Use stored signedness after minbitwidth analysis.
Need to used stored signedness info for the root node instead of recalculating it after the vectorization, which may lead to a compiler crash.
- Loading branch information
1 parent
08ce147
commit 3742c2a
Showing
2 changed files
with
25 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
llvm/test/Transforms/SLPVectorizer/X86/const-reduced-vals-resized.ll
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5 | ||
; RUN: opt -S --passes=slp-vectorizer -mtriple=x86_64-unknown-linux < %s | FileCheck %s | ||
|
||
define i32 @test() { | ||
; CHECK-LABEL: define i32 @test() { | ||
; CHECK-NEXT: [[ENTRY:.*:]] | ||
; CHECK-NEXT: [[TMP0:%.*]] = call i32 @llvm.vector.reduce.or.v4i32(<4 x i32> zeroinitializer) | ||
; CHECK-NEXT: ret i32 [[TMP0]] | ||
; | ||
entry: | ||
%cond = zext i1 false to i32 | ||
%cond258 = zext i1 false to i32 | ||
%cond283 = zext i1 false to i32 | ||
%cond308 = zext i1 false to i32 | ||
%conv685 = or i32 %cond308, %cond | ||
%conv710 = or i32 %conv685, %cond258 | ||
%conv735 = or i32 %conv710, %cond283 | ||
%conv791 = or i32 %conv735, %cond | ||
ret i32 %conv791 | ||
} |