This is an archive of the discontinued LLVM Phabricator instance.

fix a test that has no checks
ClosedPublic

Authored by spatel on Aug 6 2014, 9:41 AM.

Details

Summary

This test has no checks; it doesn't even pipe output to grep.

In an amazing display of architectural restraint, x86 doesn't have fneg instructions. :)
So check for the xor (and possibly sub) that are required to make fneg happen.

Diff Detail

Repository
rL LLVM

Event Timeline

spatel updated this revision to Diff 12239.Aug 6 2014, 9:41 AM
spatel retitled this revision from to fix a test that has no checks.
spatel updated this object.
spatel edited the test plan for this revision. (Show Details)
spatel added a reviewer: chandlerc.
spatel added a subscriber: Unknown Object (MLST).
chandlerc accepted this revision.Aug 6 2014, 1:10 PM
chandlerc edited edge metadata.

LGTM. Minor comment below.

test/CodeGen/X86/vec_fneg.ll
8 ↗(On Diff #12239)

I suspect you're going to have trouble getting this to portably match. I would use a triple such as the bare metal 'x86_64-unknown-unknown' one to get a more stable pattern.

What we really should do is add comprehensive verbose asm comments that expand constant pool operands in the comment so that we can file check them in-line.

You can see some of how to do this with my changes to X86MCInstLower.cpp for comments on PSHUFB instructions if your interested... But it'll be somewhat complex. Clearly no need to do that for this patch.

This revision is now accepted and ready to land.Aug 6 2014, 1:10 PM
spatel closed this revision.Aug 6 2014, 1:54 PM
spatel updated this revision to Diff 12249.

Closed by commit rL214992 (authored by @spatel).

test/CodeGen/X86/vec_fneg.ll
8 ↗(On Diff #12239)

Thanks for the suggestion. I'll just use a triple for now rather than -march/-mattr.

I'm all for improving the asm comments - a few weeks ago, I filed:
http://llvm.org/bugs/show_bug.cgi?id=20347

I'll see if I can make any progress there.