This is an archive of the discontinued LLVM Phabricator instance.

[GlobalISel] Translate memset/memmove/memcpy from undef ptrs into nothing
ClosedPublic

Authored by paquette on Jun 10 2019, 1:42 PM.

Details

Summary

If the source is undef, then just don't do anything.

This matches SelectionDAG's behaviour in SelectionDAG.cpp.

Also add a test showing that we do the right thing here. (irtranslator-memfunc-undef.ll)

Diff Detail

Event Timeline

paquette created this revision.Jun 10 2019, 1:42 PM
arsenm added a subscriber: arsenm.Jun 10 2019, 1:46 PM
arsenm added inline comments.
llvm/test/CodeGen/AArch64/GlobalISel/irtranslator-memfunc-undef.ll
3

This negative test seems fragile to me. Better to check entry, check-next ret or something?

paquette updated this revision to Diff 203899.Jun 10 2019, 2:33 PM
paquette marked an inline comment as done.

Improve test

arsenm accepted this revision.Jun 10 2019, 2:42 PM

LGTM

This revision is now accepted and ready to land.Jun 10 2019, 2:42 PM
This revision was automatically updated to reflect the committed changes.