[AMDGPU][GlobalISel] Fix legalization of G_UMULH
authorJay Foad <jay.foad@amd.com>
Fri, 1 Oct 2021 12:30:42 +0000 (13:30 +0100)
committerJay Foad <jay.foad@amd.com>
Tue, 5 Oct 2021 09:56:02 +0000 (10:56 +0100)
commit9ce4f372067c0e2cb5844c4a8e52c8cacd6877c5
treebc8decec5a957ccba3f8c8b2e3597598345789f0
parente463b69736da8b0a950ecd937cf990401bdfcdeb
[AMDGPU][GlobalISel] Fix legalization of G_UMULH

Scalarize before narrowing because the narrowing implementation does not
work on vectors. This matches what we do for regular G_MUL.

Differential Revision: https://reviews.llvm.org/D111129
llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-umulh.mir
llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-umulo.mir