[PATCH] D50524: [Hexagon] Replace fatal error with remark in HexagonISelLowering
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 10 13:22:48 PDT 2018
efriedma added a comment.
There's nothing wrong with simplifying code that you've proven has undefined behavior; we do that all over the place in LLVM. We already have code that specifically detects invalid loads/stores in instcombine (although it currently doesn't try to check alignment). That said, the Hexagon backend still has to be prepared for the possibility that some later pass will introduce the sequence "r0 = ##74565; r0 = memw(r0+#0)", because each of those instructions is independently valid. So this is just papering over the underlying compiler crash.
> If a user decides to use an external assembler, code like that can trigger an error
If the Hexagon backend is generating assembly that isn't valid according to the assembler, that has to be fixed in the asmprinter, or some very late MIR pass; isel is too early to catch all cases.
Repository:
rL LLVM
https://reviews.llvm.org/D50524
More information about the llvm-commits
mailing list