forked from OSchip/llvm-project
GlobalISel: translate "unreachable" (into nothing)
Easiest instruction ever! llvm-svn: 277225
This commit is contained in:
parent
5fb414d870
commit
5fc93b75d9
|
@ -269,6 +269,9 @@ bool IRTranslator::translate(const Instruction &Inst) {
|
|||
case Instruction::Alloca:
|
||||
return translateStaticAlloca(cast<AllocaInst>(Inst));
|
||||
|
||||
case Instruction::Unreachable:
|
||||
return true;
|
||||
|
||||
default:
|
||||
llvm_unreachable("Opcode not supported");
|
||||
}
|
||||
|
|
|
@ -271,3 +271,13 @@ define void @intrinsics(i32 %cur, i32 %bits) {
|
|||
call void @llvm.aarch64.neon.st2.v8i8.p0i8(<8 x i8> %vec, <8 x i8> %vec, i8* %ptr)
|
||||
ret void
|
||||
}
|
||||
|
||||
|
||||
; CHECK-LABEL: name: unreachable
|
||||
; CHECK: G_ADD
|
||||
; CHECK-NEXT: {{^$}}
|
||||
; CHECK-NEXT: ...
|
||||
define void @unreachable(i32 %a) {
|
||||
%sum = add i32 %a, %a
|
||||
unreachable
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue