[PATCH] D79452: [VectorCombine] scalarize binop of inserted elements into undef

Juneyoung Lee via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 6 17:04:24 PDT 2020


aqjune added a comment.

In D79452#2022815 <https://reviews.llvm.org/D79452#2022815>, @spatel wrote:

> In D79452#2022567 <https://reviews.llvm.org/D79452#2022567>, @spatel wrote:
>
> > undef ^ undef is actually undef:
> >  http://volta.cs.utah.edu:8080/z/GAs5QJ
> >
> > But I think we choose to fold to "0" on that to avoid breaking too much existing source code and/or expose possible semantic incompatibility with source code?
>
>
> https://groups.google.com/forum/#!topic/llvm-dev/C5ydxnn-r0o


This seems interesting.

I modified llvm/lib/IR/ConstantFold.cpp to return undef on xor undef undef, and it did not miscompile testsuite & SPEC on my machine, at least.
I can make a patch for this.


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

https://reviews.llvm.org/D79452





More information about the llvm-commits mailing list