2015-02-27 19:32:11 +01:00
|
|
|
; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort=1 -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr7 -mattr=-vsx | FileCheck %s --check-prefix=ELF64
|
2019-01-25 08:24:59 +01:00
|
|
|
; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort=1 -mtriple=powerpc64le-unknown-linux-gnu -mattr=+vsx | FileCheck %s --check-prefix=VSX
|
2018-07-18 06:25:10 +02:00
|
|
|
; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort=1 -mtriple=powerpc-unknown-linux-gnu -mcpu=e500 -mattr=spe | FileCheck %s --check-prefix=SPE
|
2019-01-25 08:24:59 +01:00
|
|
|
|
|
|
|
declare void @foo()
|
|
|
|
|
2015-07-24 03:07:50 +02:00
|
|
|
define void @t1a(float %a) nounwind {
|
2013-08-30 05:16:48 +02:00
|
|
|
entry:
|
2019-01-25 08:24:59 +01:00
|
|
|
; ELF64-LABEL: @t1a
|
|
|
|
; SPE-LABEL: @t1a
|
|
|
|
; VSX-LABEL: @t1a
|
2013-08-30 05:16:48 +02:00
|
|
|
%cmp = fcmp oeq float %a, 0.000000e+00
|
|
|
|
; ELF64: addis
|
|
|
|
; ELF64: lfs
|
|
|
|
; ELF64: fcmpu
|
2019-01-25 08:24:59 +01:00
|
|
|
; VSX: addis
|
|
|
|
; VSX: lfs
|
|
|
|
; VSX: fcmpu
|
2018-07-18 06:25:10 +02:00
|
|
|
; SPE: efscmpeq
|
2013-08-30 05:16:48 +02:00
|
|
|
br i1 %cmp, label %if.then, label %if.end
|
|
|
|
|
|
|
|
if.then: ; preds = %entry
|
|
|
|
call void @foo()
|
|
|
|
br label %if.end
|
|
|
|
|
|
|
|
if.end: ; preds = %if.then, %entry
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2015-07-24 03:07:50 +02:00
|
|
|
define void @t1b(float %a) nounwind {
|
2013-08-30 05:16:48 +02:00
|
|
|
entry:
|
2019-01-25 08:24:59 +01:00
|
|
|
; ELF64-LABEL: @t1b
|
|
|
|
; SPE-LABEL: @t1b
|
|
|
|
; VSX-LABEL: @t1b
|
2013-08-30 05:16:48 +02:00
|
|
|
%cmp = fcmp oeq float %a, -0.000000e+00
|
|
|
|
; ELF64: addis
|
|
|
|
; ELF64: lfs
|
|
|
|
; ELF64: fcmpu
|
2019-01-25 08:24:59 +01:00
|
|
|
; VSX: addis
|
|
|
|
; VSX: lfs
|
|
|
|
; VSX: fcmpu
|
|
|
|
; SPE: efscmpeq
|
|
|
|
br i1 %cmp, label %if.then, label %if.end
|
|
|
|
|
|
|
|
if.then: ; preds = %entry
|
|
|
|
call void @foo()
|
|
|
|
br label %if.end
|
|
|
|
|
|
|
|
if.end: ; preds = %if.then, %entry
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
define void @t1c(float %a) nounwind {
|
|
|
|
entry:
|
|
|
|
; ELF64-LABEL: @t1c
|
|
|
|
; SPE-LABEL: @t1c
|
|
|
|
; VSX-LABEL: @t1c
|
|
|
|
%cmp = fcmp oeq float -0.000000e+00, %a
|
|
|
|
; ELF64: addis
|
|
|
|
; ELF64: lfs
|
|
|
|
; ELF64: fcmpu
|
|
|
|
; VSX: addis
|
|
|
|
; VSX: lfs
|
|
|
|
; VSX: fcmpu
|
2018-07-18 06:25:10 +02:00
|
|
|
; SPE: efscmpeq
|
2013-08-30 05:16:48 +02:00
|
|
|
br i1 %cmp, label %if.then, label %if.end
|
|
|
|
|
|
|
|
if.then: ; preds = %entry
|
|
|
|
call void @foo()
|
|
|
|
br label %if.end
|
|
|
|
|
|
|
|
if.end: ; preds = %if.then, %entry
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2015-07-24 03:07:50 +02:00
|
|
|
define void @t2a(double %a) nounwind {
|
2013-08-30 05:16:48 +02:00
|
|
|
entry:
|
2019-01-25 08:24:59 +01:00
|
|
|
; ELF64-LABEL: @t2a
|
|
|
|
; SPE-LABEL: @t2a
|
|
|
|
; VSX-LABEL: @t2a
|
2013-08-30 05:16:48 +02:00
|
|
|
%cmp = fcmp oeq double %a, 0.000000e+00
|
|
|
|
; ELF64: addis
|
|
|
|
; ELF64: lfd
|
|
|
|
; ELF64: fcmpu
|
2019-01-25 08:24:59 +01:00
|
|
|
; VSX: addis
|
|
|
|
; VSX: lfd
|
|
|
|
; VSX: xscmpudp
|
2018-07-18 06:25:10 +02:00
|
|
|
; SPE: efdcmpeq
|
2013-08-30 05:16:48 +02:00
|
|
|
br i1 %cmp, label %if.then, label %if.end
|
|
|
|
|
|
|
|
if.then: ; preds = %entry
|
|
|
|
call void @foo()
|
|
|
|
br label %if.end
|
|
|
|
|
|
|
|
if.end: ; preds = %if.then, %entry
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2015-07-24 03:07:50 +02:00
|
|
|
define void @t2b(double %a) nounwind {
|
2013-08-30 05:16:48 +02:00
|
|
|
entry:
|
2019-01-25 08:24:59 +01:00
|
|
|
; ELF64-LABEL: @t2b
|
|
|
|
; SPE-LABEL: @t2b
|
|
|
|
; VSX-LABEL: @t2b
|
2013-08-30 05:16:48 +02:00
|
|
|
%cmp = fcmp oeq double %a, -0.000000e+00
|
|
|
|
; ELF64: addis
|
|
|
|
; ELF64: lfd
|
|
|
|
; ELF64: fcmpu
|
2019-01-25 08:24:59 +01:00
|
|
|
; VSX: addis
|
|
|
|
; VSX: lfd
|
|
|
|
; VSX: xscmpudp
|
|
|
|
; SPE: efdcmpeq
|
|
|
|
br i1 %cmp, label %if.then, label %if.end
|
|
|
|
|
|
|
|
if.then: ; preds = %entry
|
|
|
|
call void @foo()
|
|
|
|
br label %if.end
|
|
|
|
|
|
|
|
if.end: ; preds = %if.then, %entry
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
define void @t2c(double %a) nounwind {
|
|
|
|
entry:
|
|
|
|
; ELF64-LABEL: @t2c
|
|
|
|
; SPE-LABEL: @t2c
|
|
|
|
; VSX-LABEL: @t2c
|
|
|
|
%cmp = fcmp oeq double -0.000000e+00, %a
|
|
|
|
; ELF64: addis
|
|
|
|
; ELF64: lfd
|
|
|
|
; ELF64: fcmpu
|
|
|
|
; VSX: addis
|
|
|
|
; VSX: lfd
|
|
|
|
; VSX: xscmpudp
|
2018-07-18 06:25:10 +02:00
|
|
|
; SPE: efdcmpeq
|
2013-08-30 05:16:48 +02:00
|
|
|
br i1 %cmp, label %if.then, label %if.end
|
|
|
|
|
|
|
|
if.then: ; preds = %entry
|
|
|
|
call void @foo()
|
|
|
|
br label %if.end
|
|
|
|
|
|
|
|
if.end: ; preds = %if.then, %entry
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2015-07-24 03:07:50 +02:00
|
|
|
define void @t4(i8 signext %a) nounwind {
|
2013-08-30 05:16:48 +02:00
|
|
|
entry:
|
2019-01-25 08:24:59 +01:00
|
|
|
; ELF64-LABEL: @t4
|
2013-08-30 05:16:48 +02:00
|
|
|
%cmp = icmp eq i8 %a, -1
|
|
|
|
; ELF64: extsb
|
|
|
|
; ELF64: cmpwi
|
|
|
|
br i1 %cmp, label %if.then, label %if.end
|
|
|
|
|
|
|
|
if.then: ; preds = %entry
|
|
|
|
call void @foo()
|
|
|
|
br label %if.end
|
|
|
|
|
|
|
|
if.end: ; preds = %if.then, %entry
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2015-07-24 03:07:50 +02:00
|
|
|
define void @t5(i8 zeroext %a) nounwind {
|
2013-08-30 05:16:48 +02:00
|
|
|
entry:
|
2019-01-25 08:24:59 +01:00
|
|
|
; ELF64-LABEL: @t5
|
2013-08-30 05:16:48 +02:00
|
|
|
%cmp = icmp eq i8 %a, 1
|
|
|
|
; ELF64: extsb
|
|
|
|
; ELF64: cmpwi
|
|
|
|
br i1 %cmp, label %if.then, label %if.end
|
|
|
|
|
|
|
|
if.then: ; preds = %entry
|
|
|
|
call void @foo()
|
|
|
|
br label %if.end
|
|
|
|
|
|
|
|
if.end: ; preds = %if.then, %entry
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2019-01-25 08:24:59 +01:00
|
|
|
define void @t5a(i8 zeroext %a) nounwind {
|
|
|
|
entry:
|
|
|
|
; ELF64-LABEL: @t5a
|
|
|
|
%cmp = icmp eq i8 1, %a
|
|
|
|
; ELF64: extsb
|
|
|
|
; ELF64: cmpw
|
|
|
|
br i1 %cmp, label %if.then, label %if.end
|
|
|
|
|
|
|
|
if.then: ; preds = %entry
|
|
|
|
call void @foo()
|
|
|
|
br label %if.end
|
|
|
|
|
|
|
|
if.end: ; preds = %if.then, %entry
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2015-07-24 03:07:50 +02:00
|
|
|
define void @t6(i16 signext %a) nounwind {
|
2013-08-30 05:16:48 +02:00
|
|
|
entry:
|
2019-01-25 08:24:59 +01:00
|
|
|
; ELF64-LABEL: @t6
|
2013-08-30 05:16:48 +02:00
|
|
|
%cmp = icmp eq i16 %a, -1
|
|
|
|
; ELF64: extsh
|
|
|
|
; ELF64: cmpwi
|
|
|
|
br i1 %cmp, label %if.then, label %if.end
|
|
|
|
|
|
|
|
if.then: ; preds = %entry
|
|
|
|
call void @foo()
|
|
|
|
br label %if.end
|
|
|
|
|
|
|
|
if.end: ; preds = %if.then, %entry
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2015-07-24 03:07:50 +02:00
|
|
|
define void @t7(i16 zeroext %a) nounwind {
|
2013-08-30 05:16:48 +02:00
|
|
|
entry:
|
2019-01-25 08:24:59 +01:00
|
|
|
; ELF64-LABEL: @t7
|
2013-08-30 05:16:48 +02:00
|
|
|
%cmp = icmp eq i16 %a, 1
|
|
|
|
; ELF64: extsh
|
|
|
|
; ELF64: cmpwi
|
|
|
|
br i1 %cmp, label %if.then, label %if.end
|
|
|
|
|
|
|
|
if.then: ; preds = %entry
|
|
|
|
call void @foo()
|
|
|
|
br label %if.end
|
|
|
|
|
|
|
|
if.end: ; preds = %if.then, %entry
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2019-01-25 08:24:59 +01:00
|
|
|
define void @t7a(i16 zeroext %a) nounwind {
|
|
|
|
entry:
|
|
|
|
; ELF64-LABEL: @t7a
|
|
|
|
%cmp = icmp eq i16 1, %a
|
|
|
|
; ELF64: extsh
|
|
|
|
; ELF64: cmpw
|
|
|
|
br i1 %cmp, label %if.then, label %if.end
|
|
|
|
|
|
|
|
if.then: ; preds = %entry
|
|
|
|
call void @foo()
|
|
|
|
br label %if.end
|
|
|
|
|
|
|
|
if.end: ; preds = %if.then, %entry
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2015-07-24 03:07:50 +02:00
|
|
|
define void @t8(i32 %a) nounwind {
|
2013-08-30 05:16:48 +02:00
|
|
|
entry:
|
2019-01-25 08:24:59 +01:00
|
|
|
; ELF64-LABEL: @t8
|
2013-08-30 05:16:48 +02:00
|
|
|
%cmp = icmp eq i32 %a, -1
|
|
|
|
; ELF64: cmpwi
|
|
|
|
br i1 %cmp, label %if.then, label %if.end
|
|
|
|
|
|
|
|
if.then: ; preds = %entry
|
|
|
|
call void @foo()
|
|
|
|
br label %if.end
|
|
|
|
|
|
|
|
if.end: ; preds = %if.then, %entry
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2015-07-24 03:07:50 +02:00
|
|
|
define void @t9(i32 %a) nounwind {
|
2013-08-30 05:16:48 +02:00
|
|
|
entry:
|
2019-01-25 08:24:59 +01:00
|
|
|
; ELF64-LABEL: @t9
|
2013-08-30 05:16:48 +02:00
|
|
|
%cmp = icmp eq i32 %a, 1
|
|
|
|
; ELF64: cmpwi
|
|
|
|
br i1 %cmp, label %if.then, label %if.end
|
|
|
|
|
|
|
|
if.then: ; preds = %entry
|
|
|
|
call void @foo()
|
|
|
|
br label %if.end
|
|
|
|
|
|
|
|
if.end: ; preds = %if.then, %entry
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2015-07-24 03:07:50 +02:00
|
|
|
define void @t10(i32 %a) nounwind {
|
2013-08-30 05:16:48 +02:00
|
|
|
entry:
|
2019-01-25 08:24:59 +01:00
|
|
|
; ELF64-LABEL: @t10
|
2013-08-30 05:16:48 +02:00
|
|
|
%cmp = icmp eq i32 %a, 384
|
|
|
|
; ELF64: cmpwi
|
|
|
|
br i1 %cmp, label %if.then, label %if.end
|
|
|
|
|
|
|
|
if.then: ; preds = %entry
|
|
|
|
call void @foo()
|
|
|
|
br label %if.end
|
|
|
|
|
|
|
|
if.end: ; preds = %if.then, %entry
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2015-07-24 03:07:50 +02:00
|
|
|
define void @t11(i32 %a) nounwind {
|
2013-08-30 05:16:48 +02:00
|
|
|
entry:
|
2019-01-25 08:24:59 +01:00
|
|
|
; ELF64-LABEL: @t11
|
2013-08-30 05:16:48 +02:00
|
|
|
%cmp = icmp eq i32 %a, 4096
|
|
|
|
; ELF64: cmpwi
|
|
|
|
br i1 %cmp, label %if.then, label %if.end
|
|
|
|
|
|
|
|
if.then: ; preds = %entry
|
|
|
|
call void @foo()
|
|
|
|
br label %if.end
|
|
|
|
|
|
|
|
if.end: ; preds = %if.then, %entry
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2019-01-25 08:24:59 +01:00
|
|
|
define void @t11a(i32 %a) nounwind {
|
|
|
|
entry:
|
|
|
|
; ELF64-LABEL: @t11a
|
|
|
|
%cmp = icmp eq i32 4096, %a
|
|
|
|
; ELF64: cmpw
|
|
|
|
br i1 %cmp, label %if.then, label %if.end
|
|
|
|
|
|
|
|
if.then: ; preds = %entry
|
|
|
|
call void @foo()
|
|
|
|
br label %if.end
|
|
|
|
|
|
|
|
if.end: ; preds = %if.then, %entry
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2015-07-24 03:07:50 +02:00
|
|
|
define void @t12(i8 %a) nounwind {
|
2013-08-30 05:16:48 +02:00
|
|
|
entry:
|
2019-01-25 08:24:59 +01:00
|
|
|
; ELF64-LABEL: @t12
|
2013-08-30 05:16:48 +02:00
|
|
|
%cmp = icmp ugt i8 %a, -113
|
2015-04-23 20:30:38 +02:00
|
|
|
; ELF64: clrlwi
|
2013-08-30 05:16:48 +02:00
|
|
|
; ELF64: cmplwi
|
|
|
|
br i1 %cmp, label %if.then, label %if.end
|
|
|
|
|
|
|
|
if.then: ; preds = %entry
|
|
|
|
call void @foo()
|
|
|
|
br label %if.end
|
|
|
|
|
|
|
|
if.end: ; preds = %if.then, %entry
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
define void @t13() nounwind ssp {
|
|
|
|
entry:
|
2019-01-25 08:24:59 +01:00
|
|
|
; ELF64-LABEL: @t13
|
2013-08-30 05:16:48 +02:00
|
|
|
%cmp = icmp slt i32 -123, -2147483648
|
|
|
|
; ELF64: li
|
|
|
|
; ELF64: lis
|
|
|
|
; ELF64: cmpw
|
|
|
|
br i1 %cmp, label %if.then, label %if.end
|
|
|
|
|
|
|
|
if.then: ; preds = %entry
|
|
|
|
ret void
|
|
|
|
|
|
|
|
if.end: ; preds = %entry
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2015-07-24 03:07:50 +02:00
|
|
|
define void @t14(i64 %a) nounwind {
|
2013-08-30 05:16:48 +02:00
|
|
|
entry:
|
2019-01-25 08:24:59 +01:00
|
|
|
; ELF64-LABEL: @t14
|
2013-08-30 05:16:48 +02:00
|
|
|
%cmp = icmp eq i64 %a, -1
|
|
|
|
; ELF64: cmpdi
|
|
|
|
br i1 %cmp, label %if.then, label %if.end
|
|
|
|
|
|
|
|
if.then: ; preds = %entry
|
|
|
|
call void @foo()
|
|
|
|
br label %if.end
|
|
|
|
|
|
|
|
if.end: ; preds = %if.then, %entry
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2015-07-24 03:07:50 +02:00
|
|
|
define void @t15(i64 %a) nounwind {
|
2013-08-30 05:16:48 +02:00
|
|
|
entry:
|
2019-01-25 08:24:59 +01:00
|
|
|
; ELF64-LABEL: @t15
|
2013-08-30 05:16:48 +02:00
|
|
|
%cmp = icmp eq i64 %a, 1
|
|
|
|
; ELF64: cmpdi
|
|
|
|
br i1 %cmp, label %if.then, label %if.end
|
|
|
|
|
|
|
|
if.then: ; preds = %entry
|
|
|
|
call void @foo()
|
|
|
|
br label %if.end
|
|
|
|
|
|
|
|
if.end: ; preds = %if.then, %entry
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2015-07-24 03:07:50 +02:00
|
|
|
define void @t16(i64 %a) nounwind {
|
2013-08-30 05:16:48 +02:00
|
|
|
entry:
|
2019-01-25 08:24:59 +01:00
|
|
|
; ELF64-LABEL: @t16
|
2013-08-30 05:16:48 +02:00
|
|
|
%cmp = icmp eq i64 %a, 384
|
|
|
|
; ELF64: cmpdi
|
|
|
|
br i1 %cmp, label %if.then, label %if.end
|
|
|
|
|
|
|
|
if.then: ; preds = %entry
|
|
|
|
call void @foo()
|
|
|
|
br label %if.end
|
|
|
|
|
|
|
|
if.end: ; preds = %if.then, %entry
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2015-07-24 03:07:50 +02:00
|
|
|
define void @t17(i64 %a) nounwind {
|
2013-08-30 05:16:48 +02:00
|
|
|
entry:
|
2019-01-25 08:24:59 +01:00
|
|
|
; ELF64-LABEL: @t17
|
2013-08-30 05:16:48 +02:00
|
|
|
%cmp = icmp eq i64 %a, 32768
|
|
|
|
; Extra operand so we don't match on cmpdi.
|
|
|
|
; ELF64: cmpd {{[0-9]+}}
|
|
|
|
br i1 %cmp, label %if.then, label %if.end
|
|
|
|
|
|
|
|
if.then: ; preds = %entry
|
|
|
|
call void @foo()
|
|
|
|
br label %if.end
|
|
|
|
|
|
|
|
if.end: ; preds = %if.then, %entry
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2019-01-25 08:24:59 +01:00
|
|
|
define void @t17a(i64 %a) nounwind {
|
|
|
|
entry:
|
|
|
|
; ELF64-LABEL: @t17a
|
|
|
|
%cmp = icmp eq i64 32768, %a
|
|
|
|
; Extra operand so we don't match on cmpdi.
|
|
|
|
; ELF64: cmpd {{[0-9]+}}
|
|
|
|
br i1 %cmp, label %if.then, label %if.end
|
|
|
|
|
|
|
|
if.then: ; preds = %entry
|
|
|
|
call void @foo()
|
|
|
|
br label %if.end
|
|
|
|
|
|
|
|
if.end: ; preds = %if.then, %entry
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|