[all-commits] [llvm/llvm-project] 78a18d: [VP] vp intrinsics are not speculatable
Simon Moll via All-commits
all-commits at lists.llvm.org
Mon May 30 03:20:38 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 78a18d2b54e7e8e0e2c1d1cb33d015d7f69b8cc7
https://github.com/llvm/llvm-project/commit/78a18d2b54e7e8e0e2c1d1cb33d015d7f69b8cc7
Author: Simon Moll <simon.moll at emea.nec.com>
Date: 2022-05-30 (Mon, 30 May 2022)
Changed paths:
M llvm/include/llvm/Analysis/ValueTracking.h
M llvm/include/llvm/IR/Intrinsics.td
M llvm/lib/Analysis/ValueTracking.cpp
M llvm/lib/CodeGen/ExpandVectorPredication.cpp
Log Message:
-----------
[VP] vp intrinsics are not speculatable
VP intrinsics show UB if the %evl parameter is out of bounds - they must
not carry the speculatable attribute. The out-of-bounds UB disappears
when the %evl parameter is expanded into the mask or expansion replaces
the entire VP intrinsic with non-VP code.
This patch
- Removes the speculatable attribute on all VP intrinsics.
- Generalizes the isSafeToSpeculativelyExecute function to let VP
expansion know whether the VP intrinsic replacement will be
speculatable. VP expansion may only discard %evl where this is the
case.
Reviewed By: frasercrmck
Differential Revision: https://reviews.llvm.org/D125296
More information about the All-commits
mailing list