This is an archive of the discontinued LLVM Phabricator instance.

AVX-512: Lowering Masked Gather intrinsic - fixed a bug
ClosedPublic

Authored by delena on Jun 19 2017, 2:40 AM.

Details

Summary

Masked gather for vector length 2 is lowered incorrectly for element type i32.
The type <2 x i32> was automatically extended to <2 x i64> and we generated VPGATHERQQ instead of VPGATHERQD.
The type <2 x float> is extended to <4 x float>, so there is no bug for this type, but the sequence may be more optimal.

In this patch I'm fixing <2 x i32>bug and optimizing <2 x float> sequence for GATHERs only. The same fix should be done for Scatters as well.

Diff Detail

Repository
rL LLVM

Event Timeline

delena created this revision.Jun 19 2017, 2:40 AM
delena updated this revision to Diff 103365.Jun 21 2017, 6:14 AM

Added a check for memory operand type.

igorb accepted this revision.Jun 21 2017, 6:54 AM

LGTM

This revision is now accepted and ready to land.Jun 21 2017, 6:54 AM
This revision was automatically updated to reflect the committed changes.