This is an archive of the discontinued LLVM Phabricator instance.

PR32710: Disable using PMADDWD for unsigned short.
ClosedPublic

Authored by danielcdh on Apr 19 2017, 11:41 AM.

Event Timeline

danielcdh created this revision.Apr 19 2017, 11:41 AM
mkuper accepted this revision.Apr 19 2017, 11:45 AM

LGTM

This revision is now accepted and ready to land.Apr 19 2017, 11:45 AM

Hi Dehao (and Michael),

Test madd.ll has wrong CHECK-LABEL comments. For example, I see that "label" checks are lower-case. Those should be all upper-case.
I think that those checks are never used in practice.

To avoid problems with FileCheck, I also suggest to add an explicit check line for the 'ret' statement. That way, we know exactly what is the range of instructions where (v)pmaddwd should not appear.

-Andrea

Hi Dehao (and Michael),

Test madd.ll has wrong CHECK-LABEL comments. For example, I see that "label" checks are lower-case. Those should be all upper-case.
I think that those checks are never used in practice.

To avoid problems with FileCheck, I also suggest to add an explicit check line for the 'ret' statement. That way, we know exactly what is the range of instructions where (v)pmaddwd should not appear.

-Andrea

Thanks, patch updated.

Dehao

danielcdh updated this revision to Diff 95805.Apr 19 2017, 1:03 PM

update test

danielcdh closed this revision.Apr 19 2017, 1:03 PM
craig.topper added inline comments.
lib/Target/X86/X86ISelLowering.cpp
34634

Should we check Mode == MULU16 first and save the call if it is?

test/CodeGen/X86/madd.ll
1

Can we you just run utils/update_llc_test_checks.py on this file as an NFC pre-commit? Then use the script on your new test case.

Oops. didn't notice this was closed already. But can we run the script over the test now?

danielcdh added inline comments.Apr 19 2017, 1:21 PM
lib/Target/X86/X86ISelLowering.cpp
34634

We actually need to call canReduceVMulWidth first because it will set the Mode.

test/CodeGen/X86/madd.ll
1

done in r300740. Thanks