[all-commits] [llvm/llvm-project] c42c32: [InstCombine] Add reverse of ((X << nuw Z) sub nuw...
AtariDreams via All-commits
all-commits at lists.llvm.org
Sun May 26 17:03:04 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c42c32088bdb03e39ed24f4800a447d4cbb788f2
https://github.com/llvm/llvm-project/commit/c42c32088bdb03e39ed24f4800a447d4cbb788f2
Author: AtariDreams <gfunni234 at gmail.com>
Date: 2024-05-26 (Sun, 26 May 2024)
Changed paths:
M llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp
M llvm/test/Transforms/InstCombine/lshr.ll
Log Message:
-----------
[InstCombine] Add reverse of ((X << nuw Z) sub nuw Y) >>u exact Z --> X sub nuw (Y >>u exact Z) (#91386)
This is the same fold as ((X << nuw Z) sub nuw Y) >>u exact Z --> X sub
nuw (Y >>u exact Z), which we already have and approved in the codebase, but with the sub operands
swapped.
Proof it works in reverse, so we could have a wider generalization of this pattern: https://alive2.llvm.org/ce/z/2cRcdx
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list