http://llvm.org/bugs/show_bug.cgi?id=22859
Bug ID: 22859
Summary: LLVM ERROR: Cannot select: 0x3aafd10: ch = brind
0x3a59270, 0x3aaf9e0 [ORD=3] [ID=3]
Product: new-bugs
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: new bugs
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
[hjl@gnu-6 bin]$ cat /tmp/x.ll
define i8 @test1() nounwind ssp {
entry:
%0 = select i1 undef, i8* blockaddress(@test1, %bb), i8* blockaddress(@test1,
%bb6) ; <i8*> [#uses=1]
indirectbr i8* %0, [label %bb, label %bb6]
bb: ; preds = %entry
ret i8 1
bb6: ; preds = %entry
ret i8 2
}
[hjl@gnu-6 bin]$ ./llc -mtriple=x86_64-linux-gnux32 -O2 < /tmp/x.ll
.text
.file "<stdin>"
LLVM ERROR: Cannot select: 0x3aafd10: ch = brind 0x3a59270, 0x3aaf9e0 [ORD=3]
[ID=3]
0x3aaf9e0: i32 = X86ISD::Wrapper 0x3aaff30 [ID=2]
0x3aaff30: i32 = TargetBlockAddress<@test1, %bb6> 0 [ID=1]
In function: test1
[hjl@gnu-6 bin]$
Since x32 programs run in the 64-bit mode, there is no 32-bit indirect
branch. X32 should lower 32-bit indirect branch by loading the destination
of indirect branch into a 32-bit register first, which is zero-extended to
64 bits by hardware, and perform indirect branch via 64-bit register.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs