[PATCH] Lower FNEG ( FABS (x) ) -> FNABS (x) [X86 codegen] PR20578
Sanjay Patel
spatel at rotateright.com
Fri Sep 26 16:25:33 PDT 2014
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:12344
@@ +12343,3 @@
+ if (IsFABS)
+ for (SDNode *User : Op->uses())
+ if (User->getOpcode() == ISD::FNEG)
----------------
spatel wrote:
> delena wrote:
> > I think this check is not necessary because the graph always comes from bottom.
> Thanks for looking at this, Elena.
>
> Without this check, all of the vector tests in the proposed test file fail because we process the FNEG first. I don't know why this is different between scalar and vector, but it is.
Sorry - that should have been process the *FABS* first.
http://reviews.llvm.org/D5201
More information about the llvm-commits
mailing list