[PATCH] D87668: [GISel] Add new GISel combiners for G_MUL
Michael Kitzan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 14 20:05:54 PDT 2020
mkitzan created this revision.
mkitzan added reviewers: arsenm, paquette, aditya_nandakumar, dsanders, volkan.
mkitzan added a project: LLVM.
Herald added subscribers: llvm-commits, kerbowa, hiraditya, kristof.beyls, tpr, nhaehnle, jvesely.
mkitzan requested review of this revision.
Herald added a subscriber: wdng.
Patch adds two new GICombinerRules, one for `G_MUL(X, 1)` and another for `G_MUL(X, -1)`. `G_MUL(X, 1)` is an identity combine, and `G_MUL(X, -1)` gets replaced with `G_SUB(0, X)`. Patch additionally adds new combiner tests for the AArch64 target to test these new combiner rules, as well as updates AMDGPU GISel tests.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D87668
Files:
llvm/include/llvm/CodeGen/GlobalISel/CombinerHelper.h
llvm/include/llvm/Target/GlobalISel/Combine.td
llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
llvm/test/CodeGen/AArch64/GlobalISel/combine-mul.mir
llvm/test/CodeGen/AMDGPU/GlobalISel/sdiv.i64.ll
llvm/test/CodeGen/AMDGPU/GlobalISel/srem.i64.ll
llvm/test/CodeGen/AMDGPU/GlobalISel/udiv.i64.ll
llvm/test/CodeGen/AMDGPU/GlobalISel/urem.i64.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D87668.291763.patch
Type: text/x-patch
Size: 108375 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200915/ad2abd73/attachment-0001.bin>
More information about the llvm-commits
mailing list