This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU/GlobalISel: Make regbankselect of implicit_def consistent with constants
ClosedPublic

Authored by arsenm on Jan 6 2023, 5:32 AM.

Details

Reviewers
foad
Pierre-vh
mbrkusanin
Petar.Avramovic
Group Reviewers
Restricted Project

Diff Detail

Event Timeline

arsenm created this revision.Jan 6 2023, 5:32 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 6 2023, 5:32 AM
arsenm requested review of this revision.Jan 6 2023, 5:32 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 6 2023, 5:32 AM
Herald added a subscriber: wdng. · View Herald Transcript
foad added inline comments.Jan 6 2023, 5:37 AM
llvm/test/CodeGen/AMDGPU/GlobalISel/regbankselect-implicit-def.mir
135–137

Patch looks reasonable but I don't understand why it has this effect.

arsenm added inline comments.Jan 6 2023, 5:56 AM
llvm/test/CodeGen/AMDGPU/GlobalISel/regbankselect-implicit-def.mir
135–137

Previously the widen to s32 was applied to the select input, now it's being applied to the implicit_def's output too, so you get both. We currently don't try to fold out intermediate states

Pierre-vh accepted this revision.Jan 12 2023, 4:24 AM

LGTM (not sure if @foad has any concerns)?

llvm/test/CodeGen/AMDGPU/GlobalISel/regbankselect-implicit-def.mir
135–137

This will be folded by the next combine run before instruction select right?

This revision is now accepted and ready to land.Jan 12 2023, 4:24 AM
foad added a comment.Jan 12 2023, 6:46 AM

LGTM (not sure if @foad has any concerns)?

No objection from me!

arsenm closed this revision.Jan 12 2023, 7:52 PM
llvm/test/CodeGen/AMDGPU/GlobalISel/regbankselect-implicit-def.mir
135–137

Hopefully, but regbank combine hasn't seen much work