[PATCH] D58649: Fix inline assembler constraint validation
Joerg Sonnenberger via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 28 05:22:06 PST 2019
joerg marked an inline comment as done.
joerg added inline comments.
================
Comment at: include/clang/Basic/TargetInfo.h:860
+ if (!ImmSet.empty())
+ return ImmSet.count(Value.getZExtValue()) != 0;
+ return !ImmRange.isConstrained || (Value.sge(ImmRange.Min) && Value.sle(ImmRange.Max));
----------------
efriedma wrote:
> Isn't the "ImmSet.count" call still wrong? It looks like it crashes on an 128-bit immediate, and implicitly truncates a 64-bit immediate. I guess you could check `Value.isSignedIntN(32)`?
I've added that and a test case for truncation as a follow-up.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58649/new/
https://reviews.llvm.org/D58649
More information about the llvm-commits
mailing list