[PATCH] D30826: [DAG] vector div/rem with any zero element in divisor is undef
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 13 16:16:10 PDT 2017
spatel added a comment.
In https://reviews.llvm.org/D30826#698045, @efriedma wrote:
> I agree it's weird that there are two functions for constant folding... but you can leave it for now, I guess.
>
> Maybe check for null or undef, rather than just null?
================
Comment at: include/llvm/CodeGen/SelectionDAG.h:744
+ /// For the given opcode and operand values, return true if any operand value
+ /// makes this operation undefined.
+ bool isUndef(unsigned Opcode, ArrayRef<SDValue> Ops);
----------------
efriedma wrote:
> This is a little unclear... maybe "return true if the result of this operation is always undefined"?
Yep - that's better. Thanks!
https://reviews.llvm.org/D30826
More information about the llvm-commits
mailing list