All variants of isLogicalImm[Not](32|64) can be combined into a single templated function, same for printLogicalImm(32|64).
By making it use a template instead, further SVE patches can use it for other data types as well (e.g. 8, 16 bits).
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/Target/AArch64/InstPrinter/AArch64InstPrinter.cpp | ||
---|---|---|
916 ↗ | (On Diff #130593) | Shouldn't '64' be dependent on T? |
lib/Target/AArch64/InstPrinter/AArch64InstPrinter.cpp | ||
---|---|---|
916 ↗ | (On Diff #130593) | I think you're right... In practice it won't really matter since the cast to PrintVal truncates the pattern to the size of T (otherwise a pattern is repeated until the whole 64bit value is filled with that pattern), but by always passing '64' we also skip an assert that checks the value to be decoded is sensible. |
Comment Actions
Changed the second (regSize) operand to decodeLogicalImmediate() to use the sizeof(T)
(In function template<typename T> void printLogicalImm())