[all-commits] [llvm/llvm-project] 99f8b7: [InstCombine] try to fold 'or' into 'mul' operand
RotateRight via All-commits
all-commits at lists.llvm.org
Mon Nov 29 14:07:08 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 99f8b795cc03f9bcda7f9cbd9625c2976ae62bd5
https://github.com/llvm/llvm-project/commit/99f8b795cc03f9bcda7f9cbd9625c2976ae62bd5
Author: Sanjay Patel <spatel at rotateright.com>
Date: 2021-11-29 (Mon, 29 Nov 2021)
Changed paths:
M llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
M llvm/test/Transforms/InstCombine/or.ll
Log Message:
-----------
[InstCombine] try to fold 'or' into 'mul' operand
or (mul X, Y), X --> mul X, (add Y, 1) (when the multiply has no common bits with X)
We already have this fold if the pattern ends in 'add', but we can miss it if the
'add' becomes 'or' via another no-common-bits transform.
This is part of fixing:
http://llvm.org/PR49055
...but it won't make a difference on that example yet.
https://alive2.llvm.org/ce/z/Vrmoeb
Differential Revision: https://reviews.llvm.org/D114729
More information about the All-commits
mailing list