-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SLP]Fix PR70004: Do not change insert point for reduction gather nodes.
No need to change the insert point for reduction gather node, we can use the ReductionRoot as insert point instead to avoid possible crashes. (cherry picked from commit d79051f894129428ec36dedc6bbfdfdcc1bd0c17)
- Loading branch information
1 parent
69b3baf
commit 529aa6e
Showing
3 changed files
with
66 additions
and
21 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
44 changes: 44 additions & 0 deletions
44
llvm/test/Transforms/SLPVectorizer/X86/reduction-gather-non-scheduled-extracts.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,44 @@ | ||
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 3 | ||
; RUN: opt -S --passes=slp-vectorizer -mtriple=x86_64-sie-ps5 < %s | FileCheck %s | ||
|
||
define void @tes() { | ||
; CHECK-LABEL: define void @tes() { | ||
; CHECK-NEXT: entry: | ||
; CHECK-NEXT: [[TMP0:%.*]] = fcmp ole <2 x double> zeroinitializer, zeroinitializer | ||
; CHECK-NEXT: br label [[TMP1:%.*]] | ||
; CHECK: 1: | ||
; CHECK-NEXT: [[TMP2:%.*]] = select i1 false, i1 false, i1 false | ||
; CHECK-NEXT: [[TMP3:%.*]] = shufflevector <2 x i1> zeroinitializer, <2 x i1> [[TMP0]], <4 x i32> <i32 0, i32 0, i32 0, i32 2> | ||
; CHECK-NEXT: [[TMP4:%.*]] = freeze <4 x i1> [[TMP3]] | ||
; CHECK-NEXT: [[TMP5:%.*]] = call i1 @llvm.vector.reduce.and.v4i1(<4 x i1> [[TMP4]]) | ||
; CHECK-NEXT: [[OP_RDX:%.*]] = select i1 [[TMP5]], i1 false, i1 false | ||
; CHECK-NEXT: [[OP_RDX1:%.*]] = select i1 [[TMP2]], i1 [[OP_RDX]], i1 false | ||
; CHECK-NEXT: br i1 [[OP_RDX1]], label [[TMP6:%.*]], label [[TMP7:%.*]] | ||
; CHECK: 6: | ||
; CHECK-NEXT: ret void | ||
; CHECK: 7: | ||
; CHECK-NEXT: ret void | ||
; | ||
entry: | ||
%0 = extractelement <2 x i1> zeroinitializer, i64 0 | ||
%1 = extractelement <2 x i1> zeroinitializer, i64 0 | ||
%2 = fcmp ole <2 x double> zeroinitializer, zeroinitializer | ||
%3 = extractelement <2 x i1> %2, i64 0 | ||
%4 = extractelement <2 x i1> zeroinitializer, i64 0 | ||
br label %5 | ||
|
||
5: | ||
%6 = select i1 false, i1 false, i1 false | ||
%7 = select i1 %6, i1 %0, i1 false | ||
%8 = select i1 %7, i1 %1, i1 false | ||
%9 = select i1 %8, i1 false, i1 false | ||
%10 = select i1 %9, i1 %3, i1 false | ||
%11 = select i1 %10, i1 %4, i1 false | ||
br i1 %11, label %12, label %13 | ||
|
||
12: | ||
ret void | ||
|
||
13: | ||
ret void | ||
} |
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