[X86][AVX512] Add combine for TESTM
ClosedPublic

Authored by guyblank on Aug 9 2017, 10:54 AM.

Details

Summary

The patch adds an X86 combine for TESTM when one of the operands is a BUILD_VECTOR(0,0,...)

Diff Detail

Repository
rL LLVM
guyblank created this revision.Aug 9 2017, 10:54 AM
RKSimon added a subscriber: RKSimon.
RKSimon added inline comments.
lib/Target/X86/X86ISelLowering.cpp
35497 ↗(On Diff #110435)
// TEST BUILD_VECTOR(all_zero), op1 -> BUILD_VECTOR(all_zero)
35501 ↗(On Diff #110435)

Worth adding vXi1 support to the getZeroVector() helper?

guyblank added inline comments.Aug 9 2017, 10:57 PM
lib/Target/X86/X86ISelLowering.cpp
35501 ↗(On Diff #110435)

It's already supported, I somehow missed that.
Thanks.

guyblank updated this revision to Diff 110520.Aug 9 2017, 11:05 PM

Address Simon's comments.

RKSimon accepted this revision.Aug 11 2017, 5:30 AM

LGTM, thanks

This revision is now accepted and ready to land.Aug 11 2017, 5:30 AM
This revision was automatically updated to reflect the committed changes.