[llvm] [InstCombine] Propagate NUW flags for `shl (lshr X, C1), C2 -> shl X, C2-C1` (PR #72525)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 20 04:08:02 PST 2023


dtcxzyw wrote:

> It looks like only two out of four cases are covered by tests?

+ [x] positive_biggershl (lshr/ashr)
+ [x] positive_biggershl_shlnuw (lshr/ashr)
+ [x] positive_biggershl_shlnsw (lshr/ashr)
+ [x] positive_biggershl_shlnuwnsw (lshr/ashr)
+ [x] positive_biggershl_shlnsw_(lshr/ashr)exact
+ [x] positive_biggershl_shlnuw_(lshr/ashr)exact
+ [x] positive_biggershl_shlnuwnsw_(lshr/ashr)exact

I think all cases are covered by existing tests.

https://github.com/llvm/llvm-project/pull/72525


More information about the llvm-commits mailing list