[PATCH] fix for PR20354 - Miscompile of fabs due to vectorization

Pete peter_cooper at apple.com
Mon Jul 28 22:34:45 PDT 2014


This optimization itself looks useful, and the code is good, but surely this is hiding a bug?  If so, the optimization should be committed later, once we know the real cause of the bug.

You're causing more code to hit the DAG combine here, i.e., the vector case will now do so.  But to have had a miscompile the code must have been missing this combine, and hitting something later which is going wrong.

Is there another DAG combine, or even part of legalization which is wrong?  I'd expect it to be common code if both ARM and X86 exhibit the same bug.

http://reviews.llvm.org/D4633






More information about the llvm-commits mailing list