This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU/GlobalISel: Fix xnor matching
ClosedPublic

Authored by arsenm on Feb 20 2020, 7:28 PM.

Details

Diff Detail

Event Timeline

arsenm created this revision.Feb 20 2020, 7:28 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 20 2020, 7:28 PM
foad added a comment.Feb 21 2020, 12:53 AM

What was the bug? Could you pre-commit xnor.ll?

llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
2119

This is unreachable.

What was the bug? Could you pre-commit xnor.ll?

The patterns successfully imported, but we tried manually selecting the root operation before the generated matchers. We still need the manual selector because the patterns only catch i32/i64, and missing the legal v2i16/v2i32 etc. cases. I want to eventually add a vt32/vt64 type ignoring feature to tablegen so a single pattern matches any type of the given size

arsenm updated this revision to Diff 245868.Feb 21 2020, 8:21 AM

Precommit test, dead code

foad accepted this revision.Feb 21 2020, 8:35 AM

LGTM.

llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-and.mir
152

Any particular reason we lose the "dead" here? Does it matter?

This revision is now accepted and ready to land.Feb 21 2020, 8:35 AM
arsenm marked an inline comment as done.Feb 21 2020, 8:40 AM
arsenm added inline comments.
llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-and.mir
152

We were manually setting that flag in the manual matcher, but it doesn't matter. It can be inferred later