This is an archive of the discontinued LLVM Phabricator instance.

[VectorCombine] Fix for non-zero addrspace when creating vector load from scalar load
ClosedPublic

Authored by bjope on Aug 13 2020, 8:44 AM.

Details

Summary

This is a fixup to commit 43bdac290663f4424f9fb, to make sure the
address space from the original load pointer is retained in the
vector pointer.

Resolves problem with

Assertion `castIsValid(op, S, Ty) && "Invalid cast!"' failed.

due to address space mismatch.

Diff Detail

Event Timeline

bjope created this revision.Aug 13 2020, 8:44 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 13 2020, 8:44 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
bjope requested review of this revision.Aug 13 2020, 8:44 AM
spatel accepted this revision.Aug 13 2020, 8:56 AM

Thanks! LGTM - see inline for a minor mod.

llvm/lib/Transforms/Vectorize/VectorCombine.cpp
126–127

Let's put the address space into a local variable above this, so we don't have to repeat the 'get'. That will make future enhancements easier too.

This revision is now accepted and ready to land.Aug 13 2020, 8:56 AM
This revision was landed with ongoing or failed builds.Aug 13 2020, 9:26 AM
This revision was automatically updated to reflect the committed changes.