GlobalISel: Fold some idempotent operations
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Wed, 16 Nov 2022 01:49:53 +0000 (17:49 -0800)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Wed, 16 Nov 2022 15:44:46 +0000 (07:44 -0800)
commit712d35b417dd1beb373c51a9076db18811433d59
tree65624b93a71d9108e355a7af88418d4fc45b615b
parent2f8f17c157825bd2310b4e5725f0f9d75996ef52
GlobalISel: Fold some idempotent operations

This makes the existing fabs_fabs fold redundant, which
I thought was using more tablegen matching, but apparently not.
I'm not sure how to make match work with multiple opcodes. There
are a few more this could handle, but these are the ones that
legalization are more likely to introduce.
llvm/include/llvm/Target/GlobalISel/Combine.td
llvm/test/CodeGen/AMDGPU/GlobalISel/postlegalizer-combiner-fcanonicalize.mir [new file with mode: 0644]
llvm/test/CodeGen/AMDGPU/GlobalISel/postlegalizer-combiner-freeze.mir [new file with mode: 0644]