[llvm-commits] [llvm] r104624 - in /llvm/trunk: lib/CodeGen/SelectionDAG/DAGCombiner.cpp test/CodeGen/X86/2010-05-25-FP_TO_INT-crash.ll

Chris Lattner clattner at apple.com
Tue May 25 13:28:40 PDT 2010


On May 25, 2010, at 11:47 AM, Dale Johannesen wrote:

> Author: johannes
> Date: Tue May 25 13:47:23 2010
> New Revision: 104624
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=104624&view=rev
> Log:
> Fix another variant of PR 7191.  Also add a testcase
> Mon Ping provided; unfortunately bugpoint failed to
> reduce it, but I think it's important to have a test for
> this in the suite.  8023512.

I agree that a testcase is useful, but that is too big. If you can't reduce it, please remove it.

-Chris

> 
> 
> Added:
>    llvm/trunk/test/CodeGen/X86/2010-05-25-FP_TO_INT-crash.ll
> Modified:
>    llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
> 
> Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=104624&r1=104623&r2=104624&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original)
> +++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Tue May 25 13:47:23 2010
> @@ -3832,8 +3832,12 @@
>   if (N0.getOpcode() == ISD::TRUNCATE) {
>     SDValue NarrowLoad = ReduceLoadWidth(N0.getNode());
>     if (NarrowLoad.getNode()) {
> -      if (NarrowLoad.getNode() != N0.getNode())
> +      SDNode* oye = N0.getNode()->getOperand(0).getNode();
> +      if (NarrowLoad.getNode() != N0.getNode()) {
>         CombineTo(N0.getNode(), NarrowLoad);
> +        // CombineTo deleted the truncate, if needed, but not what's under it.
> +        AddToWorkList(oye);
> +      }
>       return DAG.getNode(ISD::ANY_EXTEND, N->getDebugLoc(), VT, NarrowLoad);
>     }
>   }
> 
> Added: llvm/trunk/test/CodeGen/X86/2010-05-25-FP_TO_INT-crash.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2010-05-25-FP_TO_INT-crash.ll?rev=104624&view=auto





More information about the llvm-commits mailing list