[PATCH] D42485: InstSimplify: If divisor element is undef simplify to undef

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 12 16:55:18 PST 2018


efriedma added a comment.

udiv etc. have undefined behavior if any element of the divisor is undef.  Even without optimizations, it could raise SIGFPE on x86.  (See also https://reviews.llvm.org/D41944.)

> Simplification based on demanded lanes could replace the last 2 constant divisor elements with 'undef'.

That shouldn't happen.


Repository:
  rL LLVM

https://reviews.llvm.org/D42485





More information about the llvm-commits mailing list