[SLP]Add an extra check for select minmax reduction to avoid crash.
authorAlexey Bataev <a.bataev@outlook.com>
Tue, 17 May 2022 12:32:01 +0000 (05:32 -0700)
committerAlexey Bataev <a.bataev@outlook.com>
Tue, 17 May 2022 13:05:52 +0000 (06:05 -0700)
commitb0f0313febe755eeb7bacd62cf5862d9812f1690
tree14d754fb9dd3957ea8da92d8329a94219b34c812
parent329dc5587cea126d203945f0d75eccb6a0eb4258
[SLP]Add an  extra check for select minmax reduction to avoid crash.

Need to check if the reduction is still (not)cmp-select pattern min/max
reduction to avoid compiler crash during building list of reduction
operations. cmp-sel pattern provides 2 reduction operations, while
intrinsics - just one.
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
llvm/test/Transforms/SLPVectorizer/X86/reduction-min-select.ll [new file with mode: 0644]