[all-commits] [llvm/llvm-project] 431e93: [InstCombine] Fold sub(add(x, y), min/max(x, y)) -> m...
Simon Pilgrim via All-commits
all-commits at lists.llvm.org
Mon Apr 11 03:33:14 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 431e93f4f56e5b839bf1f746d65139ccf3ca2232
https://github.com/llvm/llvm-project/commit/431e93f4f56e5b839bf1f746d65139ccf3ca2232
Author: Simon Pilgrim <llvm-dev at redking.me.uk>
Date: 2022-04-11 (Mon, 11 Apr 2022)
Changed paths:
M llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
M llvm/test/Transforms/InstCombine/sub-minmax.ll
M llvm/test/Transforms/LoopVectorize/first-order-recurrence.ll
Log Message:
-----------
[InstCombine] Fold sub(add(x,y),min/max(x,y)) -> max/min(x,y) (PR38280)
As discussed on Issue #37628, we can flip a min/max node if we're subtracting from the sum of the node's operands
Alive2: https://alive2.llvm.org/ce/z/W_KXfy
Differential Revision: https://reviews.llvm.org/D123399
More information about the All-commits
mailing list