[PATCH] D138246: [AsmPrinter] Fix Crash when Emitting Global Constant of small bit width when targeting Big Endian arch
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 28 15:28:20 PST 2022
efriedma added inline comments.
================
Comment at: llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp:3273
+ if (BitWidth < 64)
+ Realigned = Realigned.zext(ExtraBitsSize);
Realigned.lshrInPlace(ExtraBitsSize);
----------------
Please upload patches with context (use "git diff -U100000", or use Arcanist).
Maybe it's clearer to just write:
```
if (BitWidth >= 64)
Realigned.lshrInPlace(ExtraBitsSize);
```
================
Comment at: llvm/test/CodeGen/AArch64/aarch64_be-global-const.ll:6
+;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:
+; CHECK: {{.*}}
----------------
If you can't make update_llc_test_checks.py generate something appropriate, please write an appropriate CHECK line by hand.
Maybe it makes sense to just add a RUN line to an existing test, instead of adding a separate test file?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D138246/new/
https://reviews.llvm.org/D138246
More information about the llvm-commits
mailing list