[llvm] r176367 - Generate an error message instead of asserting or segfaulting when we can't

Hal Finkel hfinkel at anl.gov
Wed May 15 22:24:51 PDT 2013


----- Original Message -----
> Author: mcrosier
> Date: Fri Mar  1 13:12:05 2013
> New Revision: 176367
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=176367&view=rev
> Log:
> Generate an error message instead of asserting or segfaulting when we
> can't
> handle indirect register inputs.
> rdar://13322011

Out of curiosity, what needs to happen to support this for real? One of my users has code that is hitting this error.

Thanks again,
Hal

> 
> Added:
>     llvm/trunk/test/CodeGen/ARM/indirect-reg-input.ll
> Modified:
>     llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
> 
> Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp?rev=176367&r1=176366&r2=176367&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
> (original)
> +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp Fri
> Mar  1 13:12:05 2013
> @@ -6168,6 +6168,7 @@ void SelectionDAGBuilder::visitInlineAsm
>              Ctx.emitError(CS.getInstruction(),  "inline asm not
>              supported yet:"
>                            " don't know how to handle tied "
>                            "indirect register inputs");
> +            report_fatal_error("Cannot handle indirect register
> inputs!");
>            }
>  
>            RegsForValue MatchedRegs;
> 
> Added: llvm/trunk/test/CodeGen/ARM/indirect-reg-input.ll
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/indirect-reg-input.ll?rev=176367&view=auto
> ==============================================================================
> --- llvm/trunk/test/CodeGen/ARM/indirect-reg-input.ll (added)
> +++ llvm/trunk/test/CodeGen/ARM/indirect-reg-input.ll Fri Mar  1
> 13:12:05 2013
> @@ -0,0 +1,14 @@
> +; RUN: llc < %s -march=arm -mcpu=cortex-a8 2>&1 | FileCheck %s
> +
> +; Check for error message:
> +; CHECK: error: inline asm not supported yet: don't know how to
> handle tied indirect register inputs
> +
> +%struct.my_stack = type { %struct.myjmp_buf }
> +%struct.myjmp_buf = type { [6 x i32] }
> +
> +define void @switch_to_stack(%struct.my_stack* %stack) nounwind {
> +entry:
> +  %regs = getelementptr inbounds %struct.my_stack* %stack, i32 0,
> i32 0
> +  tail call void asm "\0A", "=*r,*0"(%struct.myjmp_buf* %regs,
> %struct.myjmp_buf* %regs)
> +  ret void
> +}
> 
> 
> _______________________________________________
> 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