diff options
author | Juneyoung Lee <aqjune@gmail.com> | 2020-08-26 04:50:29 +0900 |
---|---|---|
committer | Juneyoung Lee <aqjune@gmail.com> | 2020-08-27 02:54:48 +0900 |
commit | 684b43c0cfb1092a65c237b39d0662bfe0a2c97a (patch) | |
tree | 63ee9575e6d606b6688df6894616811b6848ff18 /llvm/utils/TableGen/CodeGenTarget.cpp | |
parent | 09288bcbf5f124a2b0e24a6b1f2d27b66dba9adf (diff) | |
download | llvm-684b43c0cfb1092a65c237b39d0662bfe0a2c97a.zip llvm-684b43c0cfb1092a65c237b39d0662bfe0a2c97a.tar.gz llvm-684b43c0cfb1092a65c237b39d0662bfe0a2c97a.tar.bz2 |
[IR] Add NoUndef attribute to Intrinsics.td
This patch adds NoUndef to Intrinsics.td.
The attribute is attached to llvm.assume's operand, because llvm.assume(undef)
is UB.
It is attached to pointer operands of several memory accessing intrinsics
as well.
This change makes ValueTracking::getGuaranteedNonPoisonOps' intrinsic check
unnecessary, so it is removed.
Reviewed By: jdoerfert
Differential Revision: https://reviews.llvm.org/D86576
Diffstat (limited to 'llvm/utils/TableGen/CodeGenTarget.cpp')
-rw-r--r-- | llvm/utils/TableGen/CodeGenTarget.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/utils/TableGen/CodeGenTarget.cpp b/llvm/utils/TableGen/CodeGenTarget.cpp index 7824d8d..889110a 100644 --- a/llvm/utils/TableGen/CodeGenTarget.cpp +++ b/llvm/utils/TableGen/CodeGenTarget.cpp @@ -846,6 +846,9 @@ void CodeGenIntrinsic::setProperty(Record *R) { } else if (R->isSubClassOf("NoAlias")) { unsigned ArgNo = R->getValueAsInt("ArgNo"); ArgumentAttributes.emplace_back(ArgNo, NoAlias, 0); + } else if (R->isSubClassOf("NoUndef")) { + unsigned ArgNo = R->getValueAsInt("ArgNo"); + ArgumentAttributes.emplace_back(ArgNo, NoUndef, 0); } else if (R->isSubClassOf("Returned")) { unsigned ArgNo = R->getValueAsInt("ArgNo"); ArgumentAttributes.emplace_back(ArgNo, Returned, 0); |