Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 888824 Details for
Bug 927978
sys-kernel/gentoo-kernel-6.6.21 will fail to compile with an ICE if llvm-17 is used with LTO
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
llvm-issue-63422-PEI-Dont-zero-out-noreg-operands.patch (text/plain), 1.72 KB, created by
ppw0
on 2024-03-27 17:37:17 UTC
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
ppw0
Created:
2024-03-27 17:37:17 UTC
Size:
1.72 KB
patch
obsolete
>diff --git a/llvm/lib/CodeGen/PrologEpilogInserter.cpp b/llvm/lib/CodeGen/PrologEpilogInserter.cpp >index e323aaae..49047719 100644 >--- a/llvm/lib/CodeGen/PrologEpilogInserter.cpp >+++ b/llvm/lib/CodeGen/PrologEpilogInserter.cpp >@@ -1285,6 +1285,8 @@ void PEI::insertZeroCallUsedRegs(MachineFunction &MF) { > continue; > > MCRegister Reg = MO.getReg(); >+ if (!Reg) >+ continue; > > // This picks up sibling registers (e.q. %al -> %ah). > for (MCRegUnit Unit : TRI.regunits(Reg)) >@@ -1308,8 +1310,11 @@ void PEI::insertZeroCallUsedRegs(MachineFunction &MF) { > if (!MO.isReg()) > continue; > >- for (const MCPhysReg &Reg : >- TRI.sub_and_superregs_inclusive(MO.getReg())) >+ MCRegister Reg = MO.getReg(); >+ if (!Reg) >+ continue; >+ >+ for (const MCPhysReg Reg : TRI.sub_and_superregs_inclusive(Reg)) > RegsToZero.reset(Reg); > } > } >diff --git a/llvm/test/CodeGen/X86/zero-call-used-regs.ll b/llvm/test/CodeGen/X86/zero-call-used-regs.ll >index 63d51c91..97ad5ce9 100644 >--- a/llvm/test/CodeGen/X86/zero-call-used-regs.ll >+++ b/llvm/test/CodeGen/X86/zero-call-used-regs.ll >@@ -241,6 +241,20 @@ entry: > ret i32 %x > } > >+define dso_local void @tailcall(ptr %p) local_unnamed_addr #0 "zero-call-used-regs"="used-gpr" { >+; I386-LABEL: tailcall: >+; I386: # %bb.0: >+; I386-NEXT: movl {{[0-9]+}}(%esp), %eax >+; I386-NEXT: jmpl *(%eax) # TAILCALL >+; >+; X86-64-LABEL: tailcall: >+; X86-64: # %bb.0: >+; X86-64-NEXT: jmpq *(%rdi) # TAILCALL >+ %c = load ptr, ptr %p >+ tail call void %c() >+ ret void >+} >+ > ; Don't emit zeroing registers in "main" function. > define dso_local i32 @main() local_unnamed_addr #1 { > ; I386-LABEL: main:
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 927978
:
888822
|
888823
| 888824