This is an archive of the discontinued LLVM Phabricator instance.

[mips] Handle undef when extracting subregs from FP64 registers.
ClosedPublic

Authored by dsanders on Oct 6 2015, 5:44 AM.

Details

Summary

This removes unnecessary instructions when extracting from an undefined register
and also fixes a crash for O32 when passing undef to a double argument in
held in integer registers.

Diff Detail

Repository
rL LLVM

Event Timeline

dsanders updated this revision to Diff 36612.Oct 6 2015, 5:44 AM
dsanders retitled this revision from to [mips] Handle undef when extracting subregs from FP64 registers..
dsanders updated this object.
dsanders added a reviewer: vkalintiris.
vkalintiris edited edge metadata.Oct 9 2015, 12:42 PM

check-llvm fails on the following tests:

LLVM :: CodeGen/Mips/buildpairextractelementf64.ll
LLVM :: CodeGen/Mips/fcopysign.ll
LLVM :: CodeGen/Mips/fp16instrinsmc.ll
LLVM :: CodeGen/Mips/fp64a.ll
LLVM :: CodeGen/Mips/fpxx.ll
LLVM :: CodeGen/Mips/i64arg.ll
LLVM :: CodeGen/Mips/mips16_32_8.ll
LLVM :: CodeGen/Mips/mno-ldc1-sdc1.ll
LLVM :: CodeGen/Mips/o32_cc.ll
LLVM :: CodeGen/Mips/o32_cc_byval.ll

lib/Target/Mips/MipsSEFrameLowering.cpp
324 ↗(On Diff #36612)

We should get the debug location from I->getDebugLoc(), right?

vkalintiris requested changes to this revision.Oct 9 2015, 12:43 PM
vkalintiris edited edge metadata.
This revision now requires changes to proceed.Oct 9 2015, 12:43 PM
dsanders updated this revision to Diff 37028.Oct 10 2015, 8:20 AM
dsanders edited edge metadata.

Check operands are registers before testing for undef.

dsanders added inline comments.Oct 10 2015, 8:22 AM
lib/Target/Mips/MipsSEFrameLowering.cpp
324 ↗(On Diff #37028)

IMPLICIT_DEF doesn't generate any code so it should affect the debug info but I've made this change anyway.

vkalintiris accepted this revision.Oct 11 2015, 8:09 AM
vkalintiris edited edge metadata.

LGTM.

This revision is now accepted and ready to land.Oct 11 2015, 8:09 AM
dsanders closed this revision.Oct 12 2015, 6:57 AM
This revision was automatically updated to reflect the committed changes.