[PATCH] D122967: [InstCombine] fold more constant divisor to select-of-constants divisor
Chenbing.Zheng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 1 23:45:34 PDT 2022
Chenbing.Zheng created this revision.
Chenbing.Zheng added reviewers: spatel, lebedev.ri, RKSimon, benshi001.
Chenbing.Zheng added a project: LLVM.
Herald added a subscriber: hiraditya.
Herald added a project: All.
Chenbing.Zheng requested review of this revision.
Herald added subscribers: llvm-commits, jacquesguan.
This patch slove TODO left in div.ll.
By adding a parameter to function FoldOpIntoSelect, we can fold more Ops to Select.
For this example, we tend to fold the division instruction, so we no longer care whether SelectInst is one use.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D122967
Files:
llvm/lib/Transforms/InstCombine/InstCombineInternal.h
llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
llvm/test/Transforms/InstCombine/div.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122967.419944.patch
Type: text/x-patch
Size: 6378 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220402/fd577838/attachment-0001.bin>
More information about the llvm-commits
mailing list