[PATCH] D125041: [GlobalISel] Combine G_SHL, G_ASHR, G_SHL of undef shifts to undef.

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 9 02:02:09 PDT 2022


foad added a comment.

> Actually G_SHL with undef LHS needs to be optimized to zero, not undef.

At the IR level, InstSimplify does this for all shifts (in the absence of exact/nsw/nuw flags). See SimplifyRightShift and SimplifyShlInst.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D125041



More information about the llvm-commits mailing list