This patch resolves https://llvm.org/bugs/show_bug.cgi?id=27414
Diff Detail
Diff Detail
Event Timeline
| lib/Target/PowerPC/PPCFrameLowering.cpp | ||
|---|---|---|
| 846–847 | Why does this need to be put into a variable? I only see it used once below - can you not just put RegState::ImplicitKill directly in the MIB.addReg call below? | |
Comment Actions
Sure, I will add "-verify-machineinstrs" in test/CodeGen/PowerPC/crsave.ll, the option can catch this issue (I've tested)
| lib/Target/PowerPC/PPCFrameLowering.cpp | ||
|---|---|---|
| 846–847 | Do you mean: MIB.addReg(MustSaveCRs[i], MfcrOpcode == PPC::MFCR8 ? RegState::ImplicitKill : RegState::Kill); | |
Comment Actions
LGTM.
| lib/Target/PowerPC/PPCFrameLowering.cpp | ||
|---|---|---|
| 846–847 | Sorry, for some reason I missed the initialization. This is fine as is. | |
Why does this need to be put into a variable? I only see it used once below - can you not just put RegState::ImplicitKill directly in the MIB.addReg call below?