This is an archive of the discontinued LLVM Phabricator instance.

[GlobalISel] Add G_UNMERGE(Cst) -> Cst1, Cst2, ... combine
ClosedPublic

Authored by qcolombet on Sep 4 2020, 2:31 PM.

Details

Summary

Add a combiner helper that replaces G_UNMERGE of big constants into direct
use of smaller constants.

Diff Detail

Event Timeline

qcolombet created this revision.Sep 4 2020, 2:31 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 4 2020, 2:31 PM
qcolombet requested review of this revision.Sep 4 2020, 2:31 PM
arsenm added inline comments.Sep 4 2020, 2:51 PM
llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
1620–1621

Should also handle G_FCONSTANT

1625

isImm is illegal

qcolombet updated this revision to Diff 290042.Sep 4 2020, 3:25 PM
  • Update AMDGPU tests
qcolombet updated this revision to Diff 290043.Sep 4 2020, 3:30 PM
  • Remove getImm(), this is illegal for G_CONSTANT
qcolombet marked an inline comment as done.Sep 4 2020, 3:34 PM
qcolombet updated this revision to Diff 290047.Sep 4 2020, 3:49 PM
  • Add G_FCONSTANT support
qcolombet marked an inline comment as done.Sep 4 2020, 3:49 PM
qcolombet added inline comments.
llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
1620–1621

Good catch!

arsenm accepted this revision.Sep 11 2020, 2:06 PM
This revision is now accepted and ready to land.Sep 11 2020, 2:06 PM
This revision was automatically updated to reflect the committed changes.
qcolombet marked an inline comment as done.