mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-31 16:02:52 +01:00
7e501cf4c3
This update was done with the following bash script: find test/CodeGen -name "*.ll" | \ while read NAME; do echo "$NAME" if ! grep -q "^; *RUN: *llc.*debug" $NAME; then TEMP=`mktemp -t temp` cp $NAME $TEMP sed -n "s/^define [^@]*@\([A-Za-z0-9_]*\)(.*$/\1/p" < $NAME | \ while read FUNC; do sed -i '' "s/;\(.*\)\([A-Za-z0-9_-]*\):\( *\)$FUNC: *\$/;\1\2-LABEL:\3$FUNC:/g" $TEMP done sed -i '' "s/;\(.*\)-LABEL-LABEL:/;\1-LABEL:/" $TEMP sed -i '' "s/;\(.*\)-NEXT-LABEL:/;\1-NEXT:/" $TEMP sed -i '' "s/;\(.*\)-NOT-LABEL:/;\1-NOT:/" $TEMP sed -i '' "s/;\(.*\)-DAG-LABEL:/;\1-DAG:/" $TEMP mv $TEMP $NAME fi done llvm-svn: 186280
96 lines
2.8 KiB
LLVM
96 lines
2.8 KiB
LLVM
; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=core-avx2 -mattr=+avx2 | FileCheck %s
|
|
|
|
; CHECK: vpandn
|
|
; CHECK: vpandn %ymm
|
|
; CHECK: ret
|
|
define <4 x i64> @vpandn(<4 x i64> %a, <4 x i64> %b) nounwind uwtable readnone ssp {
|
|
entry:
|
|
; Force the execution domain with an add.
|
|
%a2 = add <4 x i64> %a, <i64 1, i64 1, i64 1, i64 1>
|
|
%y = xor <4 x i64> %a2, <i64 -1, i64 -1, i64 -1, i64 -1>
|
|
%x = and <4 x i64> %a, %y
|
|
ret <4 x i64> %x
|
|
}
|
|
|
|
; CHECK: vpand
|
|
; CHECK: vpand %ymm
|
|
; CHECK: ret
|
|
define <4 x i64> @vpand(<4 x i64> %a, <4 x i64> %b) nounwind uwtable readnone ssp {
|
|
entry:
|
|
; Force the execution domain with an add.
|
|
%a2 = add <4 x i64> %a, <i64 1, i64 1, i64 1, i64 1>
|
|
%x = and <4 x i64> %a2, %b
|
|
ret <4 x i64> %x
|
|
}
|
|
|
|
; CHECK: vpor
|
|
; CHECK: vpor %ymm
|
|
; CHECK: ret
|
|
define <4 x i64> @vpor(<4 x i64> %a, <4 x i64> %b) nounwind uwtable readnone ssp {
|
|
entry:
|
|
; Force the execution domain with an add.
|
|
%a2 = add <4 x i64> %a, <i64 1, i64 1, i64 1, i64 1>
|
|
%x = or <4 x i64> %a2, %b
|
|
ret <4 x i64> %x
|
|
}
|
|
|
|
; CHECK: vpxor
|
|
; CHECK: vpxor %ymm
|
|
; CHECK: ret
|
|
define <4 x i64> @vpxor(<4 x i64> %a, <4 x i64> %b) nounwind uwtable readnone ssp {
|
|
entry:
|
|
; Force the execution domain with an add.
|
|
%a2 = add <4 x i64> %a, <i64 1, i64 1, i64 1, i64 1>
|
|
%x = xor <4 x i64> %a2, %b
|
|
ret <4 x i64> %x
|
|
}
|
|
|
|
; CHECK: vpblendvb
|
|
; CHECK: vpblendvb %ymm
|
|
; CHECK: ret
|
|
define <32 x i8> @vpblendvb(<32 x i1> %cond, <32 x i8> %x, <32 x i8> %y) {
|
|
%min = select <32 x i1> %cond, <32 x i8> %x, <32 x i8> %y
|
|
ret <32 x i8> %min
|
|
}
|
|
|
|
define <8 x i32> @signd(<8 x i32> %a, <8 x i32> %b) nounwind {
|
|
entry:
|
|
; CHECK-LABEL: signd:
|
|
; CHECK: psignd
|
|
; CHECK-NOT: sub
|
|
; CHECK: ret
|
|
%b.lobit = ashr <8 x i32> %b, <i32 31, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31>
|
|
%sub = sub nsw <8 x i32> zeroinitializer, %a
|
|
%0 = xor <8 x i32> %b.lobit, <i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1>
|
|
%1 = and <8 x i32> %a, %0
|
|
%2 = and <8 x i32> %b.lobit, %sub
|
|
%cond = or <8 x i32> %1, %2
|
|
ret <8 x i32> %cond
|
|
}
|
|
|
|
define <8 x i32> @blendvb(<8 x i32> %b, <8 x i32> %a, <8 x i32> %c) nounwind {
|
|
entry:
|
|
; CHECK-LABEL: blendvb:
|
|
; CHECK: pblendvb
|
|
; CHECK: ret
|
|
%b.lobit = ashr <8 x i32> %b, <i32 31, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31>
|
|
%sub = sub nsw <8 x i32> zeroinitializer, %a
|
|
%0 = xor <8 x i32> %b.lobit, <i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1>
|
|
%1 = and <8 x i32> %c, %0
|
|
%2 = and <8 x i32> %a, %b.lobit
|
|
%cond = or <8 x i32> %1, %2
|
|
ret <8 x i32> %cond
|
|
}
|
|
|
|
define <8 x i32> @allOnes() nounwind {
|
|
; CHECK: vpcmpeqd
|
|
; CHECK-NOT: vinsert
|
|
ret <8 x i32> <i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1>
|
|
}
|
|
|
|
define <16 x i16> @allOnes2() nounwind {
|
|
; CHECK: vpcmpeqd
|
|
; CHECK-NOT: vinsert
|
|
ret <16 x i16> <i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1>
|
|
}
|