[PATCH] D100721: [SCEVExpander] Try to create ASHR instr for expanded SCEV expr.

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 18 05:05:56 PDT 2021


nikic added a comment.

> Should we just add a flag to SCEVUDivExpr? Or mark UDivs as exact in a
> separate table?

Due to SCEV unification, it is not possible to transfer poison-generating flags from IR to SCEV expressions, without proving that a poison result would always cause UB in any scope for which the SCEV expression is valid. For non-addrecs this is only possible in very narrow situations (instruction in loop header, based on addrec in that loop, poison causes UB), so it's not really useful in this situation. Certainly wouldn't cover your examples.

I would recommend reverting rGec54867df5e7f20e12146e628af34f0384308bcb <https://reviews.llvm.org/rGec54867df5e7f20e12146e628af34f0384308bcb>.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D100721



More information about the llvm-commits mailing list