llvm-6502/test/CodeGen/ARM/fast-isel-br-phi.ll
Mehdi Amini 26d628d6ce Change the fast-isel-abort option from bool to int to enable "levels"
Summary:
Currently fast-isel-abort will only abort for regular instructions,
and just warn for function calls, terminators, function arguments.
There is already fast-isel-abort-args but nothing for calls and
terminators.

This change turns the fast-isel-abort options into an integer option,
so that multiple levels of strictness can be defined.
This will help no being surprised when the "abort" option indeed does
not abort, and enables the possibility to write test that verifies
that no intrinsics are forgotten by fast-isel.

Reviewers: resistor, echristo

Subscribers: jfb, llvm-commits

Differential Revision: http://reviews.llvm.org/D7941

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230775 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-27 18:32:11 +00:00

45 lines
1.5 KiB
LLVM

; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort=1 -relocation-model=dynamic-no-pic -mtriple=thumbv7-apple-ios
; This test ensures HandlePHINodesInSuccessorBlocks() is able to promote basic
; non-legal integer types (i.e., i1, i8, i16).
declare void @fooi8(i8)
declare void @fooi16(i16)
define void @foo(i1 %cmp) nounwind ssp {
entry:
br i1 %cmp, label %cond.true, label %cond.false
cond.true: ; preds = %entry
br label %cond.end
cond.false: ; preds = %entry
br label %cond.end
cond.end: ; preds = %cond.false, %cond.true
%cond = phi i1 [ 0, %cond.true ], [ 1, %cond.false ]
br i1 %cond, label %cond.true8, label %cond.false8
cond.true8: ; preds = %cond.end
br label %cond.end8
cond.false8: ; preds = %cond.end
br label %cond.end8
cond.end8: ; preds = %cond.false8, %cond.true8
%cond8 = phi i8 [ 0, %cond.true8 ], [ 1, %cond.false8 ]
call void @fooi8(i8 %cond8)
br i1 0, label %cond.true16, label %cond.false16
cond.true16: ; preds = %cond.end8
br label %cond.end16
cond.false16: ; preds = %cond.end8
br label %cond.end16
cond.end16: ; preds = %cond.false16, %cond.true16
%cond16 = phi i16 [ 0, %cond.true16 ], [ 1, %cond.false16 ]
call void @fooi16(i16 %cond16)
ret void
}