[all-commits] [llvm/llvm-project] c9fd7a: [InstCombine] Introduce tests for D153963
Antonio Frighetto via All-commits
all-commits at lists.llvm.org
Thu Jul 20 12:43:55 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c9fd7ac3c5de7265bcd96be586340b1161e67491
https://github.com/llvm/llvm-project/commit/c9fd7ac3c5de7265bcd96be586340b1161e67491
Author: Antonio Frighetto <me at antoniofrighetto.com>
Date: 2023-07-20 (Thu, 20 Jul 2023)
Changed paths:
A llvm/test/Transforms/InstCombine/binop-select-cast-of-select-cond.ll
Log Message:
-----------
[InstCombine] Introduce tests for D153963
Introduce test cases for folding binops of
`select` and cast of the `select` condition.
Differential Revision: https://reviews.llvm.org/D155510
Commit: f12a5561b2cbfae384c9a31293938ee2acea79fd
https://github.com/llvm/llvm-project/commit/f12a5561b2cbfae384c9a31293938ee2acea79fd
Author: Antonio Frighetto <me at antoniofrighetto.com>
Date: 2023-07-20 (Thu, 20 Jul 2023)
Changed paths:
M llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
M llvm/lib/Transforms/InstCombine/InstCombineInternal.h
M llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
M llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
M llvm/test/Transforms/InstCombine/binop-select-cast-of-select-cond.ll
Log Message:
-----------
[InstCombine] Fold binop of `select` and cast of `select` condition
Simplify binary operations, whose operands involve a `select`
instruction and a cast of the `select` condition. Specifically,
the binop is canonicalized into a `select` with folded arguments
as follows:
(Binop (zext C), (select C, T, F))
-> (select C, (binop 1, T), (binop 0, F))
(Binop (sext C), (select C, T, F))
-> (select C, (binop -1, T), (binop 0, F))
Proofs: https://alive2.llvm.org/ce/z/c_JwwM
Differential Revision: https://reviews.llvm.org/D153963
Compare: https://github.com/llvm/llvm-project/compare/057fc8e7d8a3...f12a5561b2cb
More information about the All-commits
mailing list