[llvm-commits] [llvm] r138068 - /llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp

Eli Friedman eli.friedman at gmail.com
Fri Aug 19 13:21:47 PDT 2011


On Fri, Aug 19, 2011 at 1:14 PM, Nick Lewycky <nicholas at mxc.ca> wrote:
> Author: nicholas
> Date: Fri Aug 19 15:14:27 2011
> New Revision: 138068
>
> URL: http://llvm.org/viewvc/llvm-project?rev=138068&view=rev
> Log:
> This is not actually unreachable, so don't use llvm_unreachable for it. Since
> the intent seems to be to terminate even in Release builds, just use abort()
> directly.

report_fatal_error() is preferred over calling abort() directly.

-Eli

> If program flow ever reaches a __builtin_unreachable (which llvm_unreachable is
> #define'd to on newer GCCs) then the program is undefined.
>
> Modified:
>    llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
>
> Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp?rev=138068&r1=138067&r2=138068&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp (original)
> +++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp Fri Aug 19 15:14:27 2011
> @@ -43,8 +43,9 @@
>     dbgs() << "ScalarizeVectorResult #" << ResNo << ": ";
>     N->dump(&DAG);
>     dbgs() << "\n";
> +    dbgs() << "Do not know how to scalarize the result of this operator!\n";
>  #endif
> -    llvm_unreachable("Do not know how to scalarize the result of this operator!");
> +    abort();
>
>   case ISD::BITCAST:           R = ScalarizeVecRes_BITCAST(N); break;
>   case ISD::BUILD_VECTOR:      R = N->getOperand(0); break;
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>




More information about the llvm-commits mailing list