1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
llvm-mirror/test/CodeGen/PowerPC/no-pref-jumps.ll
Ehsan Amiri db43217a24 Adding -verify-machineinstrs option to PowerPC tests
Currently we have a number of tests that fail with -verify-machineinstrs.
To detect this cases earlier we add the option to the testcases with the
exception of tests that will currently fail with this option. PR 27456 keeps
track of this failures.

No code review, as discussed with Hal Finkel.

llvm-svn: 277624
2016-08-03 18:17:35 +00:00

37 lines
924 B
LLVM

; RUN: llc -verify-machineinstrs -mcpu=pwr7 < %s | FileCheck %s
target datalayout = "E-m:e-i64:64-n32:64"
target triple = "powerpc64-unknown-linux-gnu"
; Function Attrs: nounwind
define void @foo(i32 signext %a, i32 signext %b) #0 {
entry:
%cmp = icmp sgt i32 %a, 5
%cmp1 = icmp slt i32 %b, 3
%or.cond = or i1 %cmp, %cmp1
br i1 %or.cond, label %if.then, label %if.else
; CHECK-LABEL: @foo
; CHECK: cmpwi
; CHECK: cmpwi
; CHECK: cror
; CHECK: blr
if.then: ; preds = %entry
tail call void bitcast (void (...)* @bar to void ()*)() #0
br label %if.end
if.else: ; preds = %entry
tail call void bitcast (void (...)* @car to void ()*)() #0
br label %if.end
if.end: ; preds = %if.else, %if.then
ret void
}
declare void @bar(...)
declare void @car(...)
attributes #0 = { nounwind }