Closed fhahn closed 1 year ago
Why call i1 @llvm.vector.reduce.or.v8i1(<8 x i1> %4) gets translated to reduce_smax <8 x i1>? Looks like it should be reduce_umax <8 x i1>, otherwise i1 value 1 is considered to be negative and 0 is chosen as a max signed value.
I think this was part of the set of issues where @fhahn's alive build had some kind of off-by-one issue with intrinsic IDs. The online version uses reduce_or and the transform verifies: https://alive2.llvm.org/ce/z/W3BmW2
Running
llvm/test/Transforms/PhaseOrdering/X86/vector-reductions-logical.ll
through Alive2 (withopt-alive.sh
) shows that SLPVectorizer performs an unsound transformation, after which the target is more poisonous than source.Reproducer IR for just running SLPVectorizer:
Report by Alive2: