<div dir="ltr">Pinging this vigorously as it is a miscompile fix that has gone without review for a week... Adding more folks.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jul 22, 2014 at 3:07 PM, Sanjay Patel <span dir="ltr"><<a href="mailto:spatel@rotateright.com" target="_blank">spatel@rotateright.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi rengolin, chandlerc, nadav,<br>
<br>
In PR20354 ( <a href="http://llvm.org/bugs/show_bug.cgi?id=20354" target="_blank">http://llvm.org/bugs/show_bug.cgi?id=20354</a> ), we're miscompiling a vector fabs operation.<br>
<br>
This patch corrects that case and allows optimization of vector fabs ops via sign bit twiddling rather than using FP instructions. It also changes the logic in visitFNEG to allow vector fneg ops to be optimized in a similar way.<br>

<br>
The fabs and fneg cases are similar enough that we should probably refactor the code to reduce duplication, but I don't want to add that complication to this patch.<br>
<br>
This patch breaks an existing ARM testcase in test/CodeGen/ARM/2009-10-21-InvalidFNeg.ll. That test was expecting use of VFPU/NEON, but now we don't even need to touch the FPU. I think that's universally better for any ARM target?<br>

<br>
I've added testcases to the existing X86 tests for vec_fabs and vec_neg. Also added a FIXME to the existing tests in vec_fneg.ll because they don't have any checks.<br>
<br>
<a href="http://reviews.llvm.org/D4633" target="_blank">http://reviews.llvm.org/D4633</a><br>
<br>
Files:<br>
  lib/CodeGen/SelectionDAG/DAGCombiner.cpp<br>
  test/CodeGen/ARM/2009-10-21-InvalidFNeg.ll<br>
  test/CodeGen/X86/vec_fabs.ll<br>
  test/CodeGen/X86/vec_fneg.ll<br>
<br>_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
<br></blockquote></div><br></div>