mirror of
https://github.com/RPCSX/llvm.git
synced 2026-01-31 01:05:23 +01:00
Fixes the overflow case of llvm.*absdiff intrinsic also updats the tests and LangRef.rst accordingly. Differential Revision: http://reviews.llvm.org/D11678 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248483 91177308-0d34-0410-b5e6-96231b3b80d8
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
|
|
}
|
|
|