[PATCH] D115419: [PowerPC] Allow absolute expressions in relocations
Nick Desaulniers via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 14 15:46:58 PST 2022
nickdesaulniers added inline comments.
================
Comment at: llvm/lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp:695
+ if (Signed)
+ return isInt<Width>(Signed ? getImmS16Context() : getImmU16Context()) &&
+ (getImmS16Context() & (Multiple - 1)) == 0;
----------------
the ternary checking `Signed` will always be true in this branch of the `if (Signed)` one line above it.
================
Comment at: llvm/lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp:698-699
+ else
+ return isUInt<Width>(Signed ? getImmS16Context()
+ : getImmU16Context()) &&
+ (getImmS16Context() & (Multiple - 1)) == 0;
----------------
and this ternary will always be false.
================
Comment at: llvm/lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp:700
+ : getImmU16Context()) &&
+ (getImmS16Context() & (Multiple - 1)) == 0;
+ }
----------------
should the unsigned branch be calling `getImmU16Context` instead of `getImmS16Context`?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115419/new/
https://reviews.llvm.org/D115419
More information about the llvm-commits
mailing list