[GlobalISel] Port the udiv -> mul by constant combine.
authorAmara Emerson <amara@apple.com>
Wed, 29 Sep 2021 06:41:11 +0000 (23:41 -0700)
committerAmara Emerson <amara@apple.com>
Thu, 7 Oct 2021 18:37:17 +0000 (11:37 -0700)
commit8bfc0e06dc85663ba3317da0c7b472260bf27948
treeaa683ce298cd4b9c25d60e974b7a0137efb28288
parente356027016c6365b3d8924f54c33e2c63d931492
[GlobalISel] Port the udiv -> mul by constant combine.

This is a straight port from the equivalent DAG combine.

Differential Revision: https://reviews.llvm.org/D110890
llvm/include/llvm/CodeGen/GlobalISel/CombinerHelper.h
llvm/include/llvm/CodeGen/GlobalISel/Utils.h
llvm/include/llvm/Target/GlobalISel/Combine.td
llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
llvm/lib/CodeGen/GlobalISel/Utils.cpp
llvm/test/CodeGen/AArch64/GlobalISel/combine-udiv.ll [new file with mode: 0644]
llvm/test/CodeGen/AArch64/GlobalISel/combine-udiv.mir [new file with mode: 0644]
llvm/test/CodeGen/AMDGPU/GlobalISel/udiv.i32.ll
llvm/test/CodeGen/AMDGPU/GlobalISel/udiv.i64.ll