[all-commits] [llvm/llvm-project] 5ab489: [NFC][InstCombine] Add tests for '((X - Y) - Z)' p...
Roman Lebedev via All-commits
all-commits at lists.llvm.org
Tue Apr 6 05:59:42 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 5ab489d9ae99c60d6f7e1e01194e0b4aacaf68af
https://github.com/llvm/llvm-project/commit/5ab489d9ae99c60d6f7e1e01194e0b4aacaf68af
Author: Roman Lebedev <lebedev.ri at gmail.com>
Date: 2021-04-06 (Tue, 06 Apr 2021)
Changed paths:
A llvm/test/Transforms/InstCombine/sub-from-sub.ll
Log Message:
-----------
[NFC][InstCombine] Add tests for '((X - Y) - Z)' pattern (PR49858)
Commit: 31d219d2997fed1b7dc97e0adf170d5aaf65883e
https://github.com/llvm/llvm-project/commit/31d219d2997fed1b7dc97e0adf170d5aaf65883e
Author: Roman Lebedev <lebedev.ri at gmail.com>
Date: 2021-04-06 (Tue, 06 Apr 2021)
Changed paths:
M llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
M llvm/test/Transforms/InstCombine/abs-1.ll
M llvm/test/Transforms/InstCombine/sub-from-sub.ll
Log Message:
-----------
[InstCombine] Fold `((X - Y) - Z)` to `X - (Y + Z)` (PR49858)
https://alive2.llvm.org/ce/z/67w-wQ
We prefer `add`s over `sub`, and this particular xform
allows further folds to happen:
Fixes https://bugs.llvm.org/show_bug.cgi?id=49858
Compare: https://github.com/llvm/llvm-project/compare/5efe9efdadcb...31d219d2997f
More information about the All-commits
mailing list