This is an archive of the discontinued LLVM Phabricator instance.

InstCombine: Use the InstSimplify hook for shufflevector
ClosedPublic

Authored by zvi on Mar 31 2017, 1:25 AM.

Details

Summary

Start using the recently added InstSimplify hook for shuffles in the respective InstCombine visitor.

Diff Detail

Repository
rL LLVM

Event Timeline

Could you please add a testcase?

lib/Transforms/InstCombine/InstCombineVectorOps.cpp
1145–1147

I'd move this above the MadeChange declaration.

zvi added a comment.Mar 31 2017, 1:46 AM

Could you please add a testcase?

InstCombine already has tests for the pattern removed:

Undefined shuffle mask -> undefined value

They continue to cover this patten.

I guess you can consider this patch as NFC-ish?

zvi added inline comments.Mar 31 2017, 1:47 AM
lib/Transforms/InstCombine/InstCombineVectorOps.cpp
1145–1147

Sure

zvi updated this revision to Diff 93604.Mar 31 2017, 1:58 AM

Move above the declaration of MadeChange

zvi marked 2 inline comments as done.Mar 31 2017, 1:59 AM
This revision is now accepted and ready to land.Mar 31 2017, 2:06 AM
This revision was automatically updated to reflect the committed changes.