[all-commits] [llvm/llvm-project] 9acc40: [InstCombine] Recognize more rotation patterns (#7...
Yingwei Zheng via All-commits
all-commits at lists.llvm.org
Thu Jan 18 04:30:05 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 9acc4042300a92856527169b28c43cebf179d6d5
https://github.com/llvm/llvm-project/commit/9acc4042300a92856527169b28c43cebf179d6d5
Author: Yingwei Zheng <dtcxzyw2333 at gmail.com>
Date: 2024-01-18 (Thu, 18 Jan 2024)
Changed paths:
M llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
M llvm/test/Transforms/InstCombine/funnel.ll
Log Message:
-----------
[InstCombine] Recognize more rotation patterns (#78107)
InstCombine already handles the pattern `(shl ShVal, (X & (Width - 1)))
| (lshr ShVal, ((-X) & (Width - 1)))`. Under certain circumstances, `X &
(Width - 1)` will be simplified to `X`. Therefore, this patch adds
support for the pattern `(shl ShVal, X) | (lshr ShVal, ((-X) & (Width -
1)))`.
Alive2: https://alive2.llvm.org/ce/z/P7JQ2V
More information about the All-commits
mailing list