-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[VectorCombine]Fix a crash during long vector analysis.
If the analysis of the single vector requested, need to use original type to avoid crash
- Loading branch information
1 parent
9827467
commit c2ae16f
Showing
2 changed files
with
21 additions
and
4 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
17 changes: 17 additions & 0 deletions
17
llvm/test/Transforms/VectorCombine/X86/reduction-two-vecs-combine.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,17 @@ | ||
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 3 | ||
; RUN: opt -S --passes=vector-combine -mtriple=x86_64-unknown-linux < %s | FileCheck %s | ||
|
||
define i16 @test_spill_mixed() { | ||
; CHECK-LABEL: define i16 @test_spill_mixed() { | ||
; CHECK-NEXT: entry: | ||
; CHECK-NEXT: [[TMP0:%.*]] = shufflevector <32 x i32> zeroinitializer, <32 x i32> zeroinitializer, <4 x i32> <i32 28, i32 29, i32 30, i32 31> | ||
; CHECK-NEXT: [[TMP1:%.*]] = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> [[TMP0]]) | ||
; CHECK-NEXT: ret i16 0 | ||
; | ||
entry: | ||
%0 = shufflevector <32 x i32> zeroinitializer, <32 x i32> zeroinitializer, <4 x i32> <i32 28, i32 29, i32 30, i32 31> | ||
%1 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %0) | ||
ret i16 0 | ||
} | ||
|
||
declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) |