diff options
author | Evan Cheng <evan.cheng@apple.com> | 2006-04-13 06:11:45 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2006-04-13 06:11:45 +0000 |
commit | 00586948aa8e11e24ea97333ec6e3f4e89c82394 (patch) | |
tree | 7a0fc0a48db445c3ca230e125fcf272d0f86f47a /lib/Target | |
parent | 82fad8ce4f8ab95544b9a721e21ffef34084a086 (diff) | |
download | external_llvm-00586948aa8e11e24ea97333ec6e3f4e89c82394.zip external_llvm-00586948aa8e11e24ea97333ec6e3f4e89c82394.tar.gz external_llvm-00586948aa8e11e24ea97333ec6e3f4e89c82394.tar.bz2 |
psad, pmax, pmin intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27647 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target')
-rw-r--r-- | lib/Target/X86/X86InstrSSE.td | 55 |
1 files changed, 54 insertions, 1 deletions
diff --git a/lib/Target/X86/X86InstrSSE.td b/lib/Target/X86/X86InstrSSE.td index ee3f148..f07f9ad 100644 --- a/lib/Target/X86/X86InstrSSE.td +++ b/lib/Target/X86/X86InstrSSE.td @@ -1421,7 +1421,6 @@ def PMULUDQrr : PDI<0xF4, MRMSrcReg, (ops VR128:$dst, VR128:$src1, VR128:$src2), [(set VR128:$dst, (int_x86_sse2_pmulu_dq VR128:$src1, VR128:$src2))]>; } - def PMULHUWrm : PDI<0xE4, MRMSrcMem, (ops VR128:$dst, VR128:$src1, i128mem:$src2), "pmulhuw {$src2, $dst|$dst, $src2}", [(set VR128:$dst, (int_x86_sse2_pmulhu_w VR128:$src1, @@ -1440,16 +1439,19 @@ def PMULUDQrm : PDI<0xF4, MRMSrcMem, (ops VR128:$dst, VR128:$src1, i128mem:$src2 [(set VR128:$dst, (int_x86_sse2_pmulu_dq VR128:$src1, (bc_v4i32 (loadv2i64 addr:$src2))))]>; +let isCommutable = 1 in { def PMADDWDrr : PDI<0xF5, MRMSrcReg, (ops VR128:$dst, VR128:$src1, VR128:$src2), "pmaddwd {$src2, $dst|$dst, $src2}", [(set VR128:$dst, (int_x86_sse2_pmadd_wd VR128:$src1, VR128:$src2))]>; +} def PMADDWDrm : PDI<0xF5, MRMSrcMem, (ops VR128:$dst, VR128:$src1, i128mem:$src2), "pmaddwd {$src2, $dst|$dst, $src2}", [(set VR128:$dst, (int_x86_sse2_pmadd_wd VR128:$src1, (bc_v8i16 (loadv2i64 addr:$src2))))]>; +let isCommutable = 1 in { def PAVGBrr : PDI<0xE0, MRMSrcReg, (ops VR128:$dst, VR128:$src1, VR128:$src2), "pavgb {$src2, $dst|$dst, $src2}", [(set VR128:$dst, (int_x86_sse2_pavg_b VR128:$src1, @@ -1458,6 +1460,7 @@ def PAVGWrr : PDI<0xE3, MRMSrcReg, (ops VR128:$dst, VR128:$src1, VR128:$src2), "pavgw {$src2, $dst|$dst, $src2}", [(set VR128:$dst, (int_x86_sse2_pavg_w VR128:$src1, VR128:$src2))]>; +} def PAVGBrm : PDI<0xE0, MRMSrcMem, (ops VR128:$dst, VR128:$src1, i128mem:$src2), "pavgb {$src2, $dst|$dst, $src2}", [(set VR128:$dst, (int_x86_sse2_pavg_b VR128:$src1, @@ -1466,6 +1469,56 @@ def PAVGWrm : PDI<0xE3, MRMSrcMem, (ops VR128:$dst, VR128:$src1, i128mem:$src2), "pavgw {$src2, $dst|$dst, $src2}", [(set VR128:$dst, (int_x86_sse2_pavg_w VR128:$src1, (bc_v8i16 (loadv2i64 addr:$src2))))]>; + +let isCommutable = 1 in { +def PMAXUBrr : PDI<0xDE, MRMSrcReg, (ops VR128:$dst, VR128:$src1, VR128:$src2), + "pmaxub {$src2, $dst|$dst, $src2}", + [(set VR128:$dst, (int_x86_sse2_pmaxu_b VR128:$src1, + VR128:$src2))]>; +def PMAXSWrr : PDI<0xEE, MRMSrcReg, (ops VR128:$dst, VR128:$src1, VR128:$src2), + "pmaxsw {$src2, $dst|$dst, $src2}", + [(set VR128:$dst, (int_x86_sse2_pmaxs_w VR128:$src1, + VR128:$src2))]>; +} +def PMAXUBrm : PDI<0xDE, MRMSrcMem, (ops VR128:$dst, VR128:$src1, i128mem:$src2), + "pmaxub {$src2, $dst|$dst, $src2}", + [(set VR128:$dst, (int_x86_sse2_pmaxu_b VR128:$src1, + (bc_v16i8 (loadv2i64 addr:$src2))))]>; +def PMAXSWrm : PDI<0xEE, MRMSrcMem, (ops VR128:$dst, VR128:$src1, i128mem:$src2), + "pmaxsw {$src2, $dst|$dst, $src2}", + [(set VR128:$dst, (int_x86_sse2_pmaxs_w VR128:$src1, + (bc_v8i16 (loadv2i64 addr:$src2))))]>; + +let isCommutable = 1 in { +def PMINUBrr : PDI<0xDA, MRMSrcReg, (ops VR128:$dst, VR128:$src1, VR128:$src2), + "pminub {$src2, $dst|$dst, $src2}", + [(set VR128:$dst, (int_x86_sse2_pminu_b VR128:$src1, + VR128:$src2))]>; +def PMINSWrr : PDI<0xEA, MRMSrcReg, (ops VR128:$dst, VR128:$src1, VR128:$src2), + "pminsw {$src2, $dst|$dst, $src2}", + [(set VR128:$dst, (int_x86_sse2_pmins_w VR128:$src1, + VR128:$src2))]>; +} +def PMINUBrm : PDI<0xDA, MRMSrcMem, (ops VR128:$dst, VR128:$src1, i128mem:$src2), + "pminub {$src2, $dst|$dst, $src2}", + [(set VR128:$dst, (int_x86_sse2_pminu_b VR128:$src1, + (bc_v16i8 (loadv2i64 addr:$src2))))]>; +def PMINSWrm : PDI<0xEA, MRMSrcMem, (ops VR128:$dst, VR128:$src1, i128mem:$src2), + "pminsw {$src2, $dst|$dst, $src2}", + [(set VR128:$dst, (int_x86_sse2_pmins_w VR128:$src1, + (bc_v8i16 (loadv2i64 addr:$src2))))]>; + + +let isCommutable = 1 in { +def PSADBWrr : PDI<0xE0, MRMSrcReg, (ops VR128:$dst, VR128:$src1, VR128:$src2), + "psadbw {$src2, $dst|$dst, $src2}", + [(set VR128:$dst, (int_x86_sse2_psad_bw VR128:$src1, + VR128:$src2))]>; +} +def PSADBWrm : PDI<0xE0, MRMSrcMem, (ops VR128:$dst, VR128:$src1, i128mem:$src2), + "psadbw {$src2, $dst|$dst, $src2}", + [(set VR128:$dst, (int_x86_sse2_psad_bw VR128:$src1, + (bc_v16i8 (loadv2i64 addr:$src2))))]>; } let isTwoAddress = 1 in { |