This is an archive of the discontinued LLVM Phabricator instance.

[InstCombine] try to convert x86 movmsk intrinsic to generic IR (PR39927)
ClosedPublic

Authored by spatel on Dec 10 2018, 3:08 PM.

Details

Summary

This has the potential to create less-than-8-bit scalar types as shown in some of the test diffs, but it looks like the backend knows how to deal with that in these patterns.
This is the simple part of the fix suggested in:
https://bugs.llvm.org/show_bug.cgi?id=39927

Diff Detail

Event Timeline

spatel created this revision.Dec 10 2018, 3:08 PM
spatel edited the summary of this revision. (Show Details)Dec 10 2018, 3:12 PM
craig.topper added inline comments.Dec 10 2018, 3:18 PM
lib/Transforms/InstCombine/InstCombineCalls.cpp
774–789

Should we have a comment here that describes what we're trying to do before we start talking about peeking through a bitcast. At first glance this looks like the comment for the whole block, but its really not.

spatel marked 2 inline comments as done.Dec 10 2018, 3:27 PM
spatel added inline comments.
lib/Transforms/InstCombine/InstCombineCalls.cpp
774–789

Yeah, that's upside-down. Will fix.

spatel updated this revision to Diff 177607.Dec 10 2018, 3:29 PM
spatel marked an inline comment as done.

Patch updated:
Fix code comment to better explain what we're doing.

This revision is now accepted and ready to land.Dec 10 2018, 10:28 PM
This revision was automatically updated to reflect the committed changes.