[all-commits] [llvm/llvm-project] c35939: [VectorCombine] Use isSafeToSpeculativelyExecute t...
Luke Lau via All-commits
all-commits at lists.llvm.org
Thu Oct 19 09:45:34 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c35939b22eba9440dff0509b1c2608de39478f14
https://github.com/llvm/llvm-project/commit/c35939b22eba9440dff0509b1c2608de39478f14
Author: Luke Lau <luke at igalia.com>
Date: 2023-10-19 (Thu, 19 Oct 2023)
Changed paths:
M llvm/lib/Transforms/Vectorize/VectorCombine.cpp
M llvm/test/Transforms/VectorCombine/RISCV/vpintrin-scalarization.ll
Log Message:
-----------
[VectorCombine] Use isSafeToSpeculativelyExecute to guard VP scalarization (#69494)
Previously we were just matching against a fixed list of VP intrinsics
that we
knew couldn't be speculated, but we can reuse the logic in
isSafeToSpeculativelyExecuteWithOpcode. This also allows speculation in
more
cases, e.g. when the divisor is known to be non-zero.
Unfortunately we can't reuse the exact same function call for VP
intrinsics
with functional intrinsics instead of opcodes, because
isSafeToSpeculativelyExecute needs an instruction that already exists.
So this
just copies the logic by peeking into the function attributes of the
intrinsic.
More information about the All-commits
mailing list