[llvm] r284580 - [Thumb-1] Synthesize TBB/TBH instructions to make use of compressed jump tables
Friedman, Eli via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 19 11:30:02 PDT 2016
On 10/19/2016 5:06 AM, James Molloy via llvm-commits wrote:
> Author: jamesm
> Date: Wed Oct 19 07:06:49 2016
> New Revision: 284580
>
> URL: http://llvm.org/viewvc/llvm-project?rev=284580&view=rev
> Log:
> [Thumb-1] Synthesize TBB/TBH instructions to make use of compressed jump tables
This is crashing in some cases. IR attached.
The crash is here:
MachineInstr *Shift = User.MI->getPrevNode();
if (Shift->getOpcode() != ARM::tLSLri ||
Shift->getOperand(3).getImm() != 2 ||
!Shift->getOperand(2).isKill())
continue;
I think the problem is that you're incorrectly assuming that tLEApcrelJT
isn't the first instruction in a basic block.
-Eli
--
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
-------------- next part --------------
target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
target triple = "thumbv5e-none-linux-gnueabi"
%struct.MACROBLOCK.1.8.15.22.29.36.43.50.57.64.78.120.134 = type { [4 x %struct.VECTOR.0.7.14.21.28.35.42.49.56.63.77.119.133], [6 x [15 x i16]], [6 x i32], i32, i32, i32, i32, i32, i32, %struct.VECTOR.0.7.14.21.28.35.42.49.56.63.77.119.133, [4 x %struct.VECTOR.0.7.14.21.28.35.42.49.56.63.77.119.133], [4 x %struct.VECTOR.0.7.14.21.28.35.42.49.56.63.77.119.133], [4 x i32], i32, i32, i32, [4 x %struct.VECTOR.0.7.14.21.28.35.42.49.56.63.77.119.133], [4 x %struct.VECTOR.0.7.14.21.28.35.42.49.56.63.77.119.133], i32, %struct.VECTOR.0.7.14.21.28.35.42.49.56.63.77.119.133, i32 }
%struct.VECTOR.0.7.14.21.28.35.42.49.56.63.77.119.133 = type { i32, i32 }
define void @predict_acdc(%struct.MACROBLOCK.1.8.15.22.29.36.43.50.57.64.78.120.134* %pMBs, i32 %block) {
entry:
%arrayidx3 = getelementptr inbounds %struct.MACROBLOCK.1.8.15.22.29.36.43.50.57.64.78.120.134, %struct.MACROBLOCK.1.8.15.22.29.36.43.50.57.64.78.120.134* %pMBs, i32 undef, i32 2, i32 %block
switch i32 %block, label %sw.epilog [
i32 0, label %sw.bb
i32 1, label %sw.bb79
i32 2, label %sw.bb85
i32 3, label %sw.bb91
i32 4, label %sw.bb94
i32 5, label %sw.bb107
]
sw.bb: ; preds = %entry
unreachable
sw.bb79: ; preds = %entry
unreachable
sw.bb85: ; preds = %entry
unreachable
sw.bb91: ; preds = %entry
unreachable
sw.bb94: ; preds = %entry
unreachable
sw.bb107: ; preds = %entry
unreachable
sw.epilog: ; preds = %entry
store i32 1, i32* %arrayidx3, align 4
unreachable
}
More information about the llvm-commits
mailing list