[PATCH] D64699: [X86] Use getLimitedValue to clamp and out of range shift amount instead of asserting.

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 14 02:28:38 PDT 2019


RKSimon added a comment.

This is only ever coming from ISD::SHL/SRL/SRA so returning UNDEF should be fine.

Alternatively if we wanted to match the sse behaviour, then we'd keep the clamp for SRA and return 0 for SHL/SRL cases.

Overall I think I prefer the UNDEF route tbh.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D64699





More information about the llvm-commits mailing list