llvm-project
999c1c8f - [InstSimplify] Fold llvm.{sshl,ushl}.sat with saturated LHS (#242217)

Commit
1 day ago
[InstSimplify] Fold llvm.{sshl,ushl}.sat with saturated LHS (#242217) Fold ushl.sat(-1, Y) -> -1. Fold sshl.sat(SINT_MAX, Y) -> SINT_MAX and sshl.sat(SINT_MIN, Y) -> SINT_MIN. Also return Op0 directly on 0 << Y to preserve poison elements. Follows https://github.com/llvm/llvm-project/pull/241127#discussion_r4537251015. Alive2: https://alive2.llvm.org/ce/z/E8L2xo
Author
Parents
Loading