Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge 6b2fd7aed66d592738f26c76caa8fff95e168598 into 18.x #80877

Closed
brad0 opened this issue Feb 6, 2024 · 3 comments
Closed

Merge 6b2fd7aed66d592738f26c76caa8fff95e168598 into 18.x #80877

brad0 opened this issue Feb 6, 2024 · 3 comments

Comments

@brad0
Copy link
Contributor

brad0 commented Feb 6, 2024

[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
rust-lang/rust#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 1995b9f for SPARC, which also
handles MIPS.

@brad0 brad0 added this to the LLVM 18.X Release milestone Feb 6, 2024
@brad0
Copy link
Contributor Author

brad0 commented Feb 6, 2024

/cherry-pick 6b2fd7a

@llvmbot
Copy link
Collaborator

llvmbot commented Feb 6, 2024

/pull-request #80878

@llvmbot
Copy link
Collaborator

llvmbot commented Feb 6, 2024

@llvm/issue-subscribers-backend-mips

Author: Brad Smith (brad0)

[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
rust-lang/rust#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 1995b9f for SPARC, which also
handles MIPS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

3 participants