[PATCH] D126692: [InstCombine] Expand select+masked_load combine to include FP splats of -0.0
David Sherwood via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 31 06:18:28 PDT 2022
david-arm added a comment.
Hi @nikic, looking again at this I realised that it's not the vectoriser generating the splat of -0.0. I think it's instcombine itself! A sample output from the vectoriser looks like this:
%wide.masked.load = call <vscale x 4 x float> @llvm.masked.load.nxv4f32.p0(ptr %11, i32 4, <vscale x 4 x i1> %active.lane.mask, <vscale x 4 x float> poison), !tbaa !10
%12 = fadd fast <vscale x 4 x float> %wide.masked.load, %vec.phi
%13 = select <vscale x 4 x i1> %active.lane.mask, <vscale x 4 x float> %12, <vscale x 4 x float> %vec.phi
and I think that instcombine moves the select between the fadd and masked.load. In doing so it creates a new select that selects between `%wide.masked.load` and a splat of -0.0. So perhaps the real solution here is to teach instcombine to create a sensible splat value?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D126692/new/
https://reviews.llvm.org/D126692
More information about the llvm-commits
mailing list