[PATCH] D68654: [CVP} Replace SExt with ZExt if the input is known-non-negative

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 8 12:12:43 PDT 2019


nikic accepted this revision.
nikic added a comment.
This revision is now accepted and ready to land.

LGTM. Especially as we already have the corresponding `ashr` to `lshr` transform, this seems like an obvious extension.



================
Comment at: llvm/test/Transforms/CorrelatedValuePropagation/sext.ll:46
 
 ;; Negative test to show transform doesn't happen unless n > 0.
 define void @test2(i32 %n) {
----------------
nit: `n >= 0`


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68654/new/

https://reviews.llvm.org/D68654





More information about the llvm-commits mailing list