This is an archive of the discontinued LLVM Phabricator instance.

[mips][mips64r6] c.cond.fmt, mov[fntz], and mov[fntz].[ds] are not available on MIPS32r6/MIPS64r6
ClosedPublic

Authored by dsanders on Jun 3 2014, 3:47 AM.

Details

Summary

c.cond.fmt has been replaced by cmp.cond.fmt. Where c.cond.fmt wrote to
dedicated condition registers, cmp.cond.fmt writes 1 or 0 to normal FGR's
(like the GPR comparisons).

mov[fntz] have been replaced by seleqz and selnez. These instructions
conditionally zero a register based on a bool in a GPR. The results can
then be or'd together to act as a select without, for example, requiring a third
register read port.

mov[fntz].[ds] have been replaced with sel.[ds]

MIPS64r6 currently generates unnecessary sign-extensions for most selects.
This is because the result of a SETCC is currently an i32. Bits 32-63 are
undefined in i32 and the behaviour of seleqz/selnez would otherwise depend
on undefined bits. Later, we will fix this by making the result of SETCC an
i64 on MIPS64 targets.

Depends on D3958

Diff Detail

Event Timeline

dsanders updated this revision to Diff 10051.Jun 3 2014, 3:47 AM
dsanders retitled this revision from to [mips][mips64r6] c.cond.fmt, mov[fntz], and mov[fntz].[ds] are not available on MIPS32r6/MIPS64r6.
dsanders updated this object.
dsanders edited the test plan for this revision. (Show Details)
dsanders updated this revision to Diff 10052.Jun 3 2014, 5:13 AM

Removed the comment about the removal of c.cond.fmt since this has been done.

LGTM with a nit.

lib/Target/Mips/Mips32r6InstrInfo.td
630

Some of the lines are longer than 80 characters.

zoran.jovanovic accepted this revision.Jun 12 2014, 2:58 AM
zoran.jovanovic edited edge metadata.
This revision is now accepted and ready to land.Jun 12 2014, 2:58 AM
vmedic accepted this revision.Jun 12 2014, 3:04 AM
vmedic edited edge metadata.

Same comment as Zoran, looks good with a nit(80 character limit).

dsanders updated this revision to Diff 10360.Jun 12 2014, 6:35 AM
dsanders edited edge metadata.

Refresh after resolving rebase conflicts

dsanders closed this revision.Jun 12 2014, 6:46 AM

The 80 col corrections were committed in r210778 since I forgot to do them for r210777