This is an archive of the discontinued LLVM Phabricator instance.

[X86][FastISel] Use a COPY from K register to a GPR instead of a K operation
ClosedPublic

Authored by guyblank on Sep 26 2016, 11:48 PM.

Details

Summary

The KORTEST was introduced due to a bug where a TEST instruction used a K register.
but, turns out that the opposite case of KORTEST using a GPR is now happening (as seen in several bug reports, for example)

The change removes the KORTEST flow and adds a COPY instruction from the K reg to a GPR.

Diff Detail

Repository
rL LLVM

Event Timeline

guyblank updated this revision to Diff 72605.Sep 26 2016, 11:48 PM
guyblank retitled this revision from to [X86][FastISel] Use a COPY from K register to a GPR instead of a K operation.
guyblank updated this object.
guyblank added reviewers: delena, igorb, craig.topper, zvi.
guyblank added a subscriber: llvm-commits.

General comment:
'tmp' is a bad name for a variable, give a meaningful name and start from capital letter (see http://llvm.org/docs/CodingStandards.html#name-types-functions-variables-and-enumerators-properly)

zvi edited edge metadata.Sep 27 2016, 3:12 AM

Please add a test case for the problem this commit addresses.

guyblank updated this revision to Diff 72638.Sep 27 2016, 6:10 AM
guyblank edited edge metadata.

Thanks Alexey & Zvi

update according to your comments.
without the patch, the added test produces a KORTEST with a GPR instead of a TEST.

delena accepted this revision.Sep 28 2016, 4:00 AM
delena edited edge metadata.
This revision is now accepted and ready to land.Sep 28 2016, 4:00 AM
This revision was automatically updated to reflect the committed changes.