mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-26 22:42:46 +02:00
6a500d5451
Fixes the overflow case of llvm.*absdiff intrinsic also updats the tests and LangRef.rst accordingly. Differential Revision: http://reviews.llvm.org/D11678 llvm-svn: 248483
30 lines
879 B
LLVM
30 lines
879 B
LLVM
; RUN: llc < %s -mtriple=x86_64-unknown-unknown | FileCheck %s
|
|
|
|
declare <16 x i16> @llvm.sabsdiff.v16i16(<16 x i16>, <16 x i16>)
|
|
|
|
define <16 x i16> @test_sabsdiff_v16i16_expand(<16 x i16> %a1, <16 x i16> %a2) {
|
|
; CHECK-LABEL: test_sabsdiff_v16i16_expand:
|
|
; CHECK: # BB#0:
|
|
; CHECK: psubw
|
|
; CHECK: pxor
|
|
; CHECK: pcmpgtw
|
|
; CHECK: movdqa
|
|
; CHECK: pandn
|
|
; CHECK: pxor
|
|
; CHECK: psubw
|
|
; CHECK: pcmpeqd
|
|
; CHECK: pxor
|
|
; CHECK: pandn
|
|
; CHECK: por
|
|
; CHECK: pcmpgtw
|
|
; CHECK-DAG: psubw {{%xmm[0-9]+}}, [[SRC:%xmm[0-9]+]]
|
|
; CHECK-DAG: pxor {{%xmm[0-9]+}}, [[DST:%xmm[0-9]+]]
|
|
; CHECK: pandn [[SRC]], [[DST]]
|
|
; CHECK: por
|
|
; CHECK: movdqa
|
|
; CHECK: retq
|
|
%1 = call <16 x i16> @llvm.sabsdiff.v16i16(<16 x i16> %a1, <16 x i16> %a2)
|
|
ret <16 x i16> %1
|
|
}
|
|
|