mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-10 02:36:06 +00:00
"The original bug was a complaint that _mm_srli_si128 mis-compiled when passed
a constant vector ("{0x123, 0x456}" syntax). The fix is to simplify the _mm_srli_si128 macro, and move the "* 8" from the macro into the compiler back-end. I can't change the existing __builtins because so many people are using them :-(." Patch by Stuart Hastings! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56944 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
bb14672097
commit
5e249b4a14
@ -371,6 +371,12 @@ let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.".
|
||||
def int_x86_sse2_psrl_dq : GCCBuiltin<"__builtin_ia32_psrldqi128">,
|
||||
Intrinsic<[llvm_v2i64_ty, llvm_v2i64_ty,
|
||||
llvm_i32_ty], [IntrNoMem]>;
|
||||
def int_x86_sse2_psll_dq_bs : GCCBuiltin<"__builtin_ia32_pslldqi128_byteshift">,
|
||||
Intrinsic<[llvm_v2i64_ty, llvm_v2i64_ty,
|
||||
llvm_i32_ty], [IntrNoMem]>;
|
||||
def int_x86_sse2_psrl_dq_bs : GCCBuiltin<"__builtin_ia32_psrldqi128_byteshift">,
|
||||
Intrinsic<[llvm_v2i64_ty, llvm_v2i64_ty,
|
||||
llvm_i32_ty], [IntrNoMem]>;
|
||||
}
|
||||
|
||||
// Integer comparison ops
|
||||
|
@ -1969,6 +1969,10 @@ let Predicates = [HasSSE2] in {
|
||||
(v2i64 (PSLLDQri VR128:$src1, (PSxLDQ_imm imm:$src2)))>;
|
||||
def : Pat<(int_x86_sse2_psrl_dq VR128:$src1, imm:$src2),
|
||||
(v2i64 (PSRLDQri VR128:$src1, (PSxLDQ_imm imm:$src2)))>;
|
||||
def : Pat<(int_x86_sse2_psll_dq_bs VR128:$src1, imm:$src2),
|
||||
(v2i64 (PSLLDQri VR128:$src1, imm:$src2))>;
|
||||
def : Pat<(int_x86_sse2_psrl_dq_bs VR128:$src1, imm:$src2),
|
||||
(v2i64 (PSRLDQri VR128:$src1, imm:$src2))>;
|
||||
def : Pat<(v2f64 (X86fsrl VR128:$src1, i32immSExt8:$src2)),
|
||||
(v2f64 (PSRLDQri VR128:$src1, (PSxLDQ_imm imm:$src2)))>;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user