[PATCH] D112064: [GlobalISel] Combine (build_vector_trunc x, undef) -> (bitcast x)
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 13 06:54:59 PST 2021
arsenm added inline comments.
================
Comment at: llvm/test/CodeGen/AMDGPU/GlobalISel/combine-fcanonicalize.mir:256
; CHECK-NEXT: [[FMUL:%[0-9]+]]:_(<2 x s16>) = G_FMUL [[COPY]], %two_splat
+ ; CHECK-NEXT: %zero_undef_fcan:_(<2 x s16>) = G_FCANONICALIZE %zero_undef
; CHECK-NEXT: [[FCANONICALIZE:%[0-9]+]]:_(<2 x s16>) = G_FCANONICALIZE [[FMUL]]
----------------
arsenm wrote:
> foad wrote:
> > Regression here because combining `G_BUILD_VECTOR_TRUNC %zero_s32(s32), %undef(s32)` into a G_BITCAST breaks detection of a constant splat with some elements undef.
> >
> > Any thoughts on how to fix this? Perhaps it was not a good idea to do this as a combine after all, despite the comment in AMDGPUInstructionSelector::selectG_BUILD_VECTOR_TRUNC?
> I think the globalisel version of isCanonicalized needs to be implemented for G_BITCAST
Or everything really. It's pretty thin right now
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D112064/new/
https://reviews.llvm.org/D112064
More information about the llvm-commits
mailing list