This is an archive of the discontinued LLVM Phabricator instance.

[GVN] Account for masked loads/stores depending on load/store instructions
ClosedPublic

Authored by kparzysz on Sep 9 2020, 4:16 PM.

Details

Summary

This is a case where an intrinsic depends on a non-call instruction.

This fixes the testcase from https://reviews.llvm.org/D87061.

Diff Detail

Event Timeline

kparzysz created this revision.Sep 9 2020, 4:16 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 9 2020, 4:16 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
fhahn accepted this revision.Sep 10 2020, 6:16 AM

LGTM thanks. Please run clang-format-diff before committing.

llvm/lib/Transforms/Scalar/GVN.cpp
417

nit: I think it is more common in this file to use !local_cdep instead of local_cdefp == nullptr.

llvm/test/Transforms/GVN/masked-load-store-vn-crash.ll
5

nit: I think the dso_local fastcc unnamed_addr #0 can eb removed.

This revision is now accepted and ready to land.Sep 10 2020, 6:16 AM
This revision was landed with ongoing or failed builds.Sep 10 2020, 8:58 AM
This revision was automatically updated to reflect the committed changes.