diff options
author | Fangrui Song <i@maskray.me> | 2024-02-06 09:23:33 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-06 09:23:33 -0800 |
commit | 6b2fd7aed66d592738f26c76caa8fff95e168598 (patch) | |
tree | c376e9f2024a55bc31dc3e5252d6b53ead102ac6 /llvm/lib/Transforms/Utils/Debugify.cpp | |
parent | 8ea858b96787578e814723a009f443808f446378 (diff) | |
download | llvm-6b2fd7aed66d592738f26c76caa8fff95e168598.zip llvm-6b2fd7aed66d592738f26c76caa8fff95e168598.tar.gz llvm-6b2fd7aed66d592738f26c76caa8fff95e168598.tar.bz2 |
[MIPS] Use generic isBlockOnlyReachableByFallthrough (#80799)
FastISel may create a redundant BGTZ terminal which fallthroughes.
```
BGTZ %2:gpr32, %bb.1, implicit-def $at
bb.1.bb1:
; predecessors: %bb.0
```
The `!I->isBarrier()` check in
MipsAsmPrinter::isBlockOnlyReachableByFallthrough
will incorrectly not print a label, leading to a `Undefined temporary
symbol `
error when we try assembling the output assembly file. See the updated
`Fast-ISel/pr40325.ll` and
https://github.com/rust-lang/rust/issues/108835
In addition, the `SwitchInst` condition is too conservative and prints
many unneeded labels (see the updated tests).
Just use the generic isBlockOnlyReachableByFallthrough, updated by
commit 1995b9fead62f2f6c0ad217bd00ce3184f741fdb for SPARC, which also
handles MIPS.
Diffstat (limited to 'llvm/lib/Transforms/Utils/Debugify.cpp')
0 files changed, 0 insertions, 0 deletions