[all-commits] [llvm/llvm-project] ffe139: [InstCombine] Fold (A & 2^C1) + A => A & (2^C1 - 1...
Simon Pilgrim via All-commits
all-commits at lists.llvm.org
Fri Apr 22 08:59:18 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ffe13960b5795b08b574b31720b517c59f26ca2f
https://github.com/llvm/llvm-project/commit/ffe13960b5795b08b574b31720b517c59f26ca2f
Author: Simon Pilgrim <llvm-dev at redking.me.uk>
Date: 2022-04-22 (Fri, 22 Apr 2022)
Changed paths:
M llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
M llvm/test/Transforms/InstCombine/add-mask.ll
M llvm/test/Transforms/InstCombine/modulo.ll
Log Message:
-----------
[InstCombine] Fold (A & 2^C1) + A => A & (2^C1 - 1) iff bit C1 in A is a sign bit (PR21929)
Alive2: https://alive2.llvm.org/ce/z/Ygq26C
This is the final missing fold to handle the modulo2 simplification: https://github.com/llvm/llvm-project/issues/22303
Fixes #22303
Differential Revision: https://reviews.llvm.org/D123374
More information about the All-commits
mailing list