diff options
| author | Craig Topper <craig.topper@gmail.com> | 2016-09-18 18:59:36 +0000 |
|---|---|---|
| committer | Craig Topper <craig.topper@gmail.com> | 2016-09-18 18:59:36 +0000 |
| commit | 8542041bb27cfb501b61984b3c4a86e6edeba9af (patch) | |
| tree | c0d1404e56381e380250ac7a2f35887b9978232d /llvm/lib/Target | |
| parent | 8c252bc4ddd9b77c0c752f97f4b56613fec4cc6d (diff) | |
| download | bcm5719-llvm-8542041bb27cfb501b61984b3c4a86e6edeba9af.tar.gz bcm5719-llvm-8542041bb27cfb501b61984b3c4a86e6edeba9af.zip | |
[AVX-512] Add memory load patterns for the legacy SSE scalar fp to integer conversion intrinsics to be consistent across all intruction sets.
llvm-svn: 281861
Diffstat (limited to 'llvm/lib/Target')
| -rw-r--r-- | llvm/lib/Target/X86/X86InstrAVX512.td | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/llvm/lib/Target/X86/X86InstrAVX512.td b/llvm/lib/Target/X86/X86InstrAVX512.td index 5638ec187e4..acdb1ff4ad0 100644 --- a/llvm/lib/Target/X86/X86InstrAVX512.td +++ b/llvm/lib/Target/X86/X86InstrAVX512.td @@ -5590,12 +5590,20 @@ defm VCVTSD2USI64Z: avx512_cvt_s_int_round<0x79, f64x_info, i64x_info, let Predicates = [HasAVX512] in { def : Pat<(i32 (int_x86_sse_cvtss2si (v4f32 VR128X:$src))), (VCVTSS2SIZrr VR128X:$src)>; + def : Pat<(i32 (int_x86_sse_cvtss2si (sse_load_f32 addr:$src))), + (VCVTSS2SIZrm addr:$src)>; def : Pat<(i64 (int_x86_sse_cvtss2si64 (v4f32 VR128X:$src))), (VCVTSS2SI64Zrr VR128X:$src)>; + def : Pat<(i64 (int_x86_sse_cvtss2si64 (sse_load_f32 addr:$src))), + (VCVTSS2SI64Zrm addr:$src)>; def : Pat<(i32 (int_x86_sse2_cvtsd2si (v2f64 VR128X:$src))), (VCVTSD2SIZrr VR128X:$src)>; + def : Pat<(i32 (int_x86_sse2_cvtsd2si (sse_load_f64 addr:$src))), + (VCVTSD2SIZrm addr:$src)>; def : Pat<(i64 (int_x86_sse2_cvtsd2si64 (v2f64 VR128X:$src))), (VCVTSD2SI64Zrr VR128X:$src)>; + def : Pat<(i64 (int_x86_sse2_cvtsd2si64 (sse_load_f64 addr:$src))), + (VCVTSD2SI64Zrm addr:$src)>; } // HasAVX512 let isCodeGenOnly = 1 , Predicates = [HasAVX512] in { @@ -5691,13 +5699,20 @@ defm VCVTTSD2USI64Z: avx512_cvt_s_all<0x78, "vcvttsd2usi", f64x_info, i64x_info, let Predicates = [HasAVX512] in { def : Pat<(i32 (int_x86_sse_cvttss2si (v4f32 VR128X:$src))), (VCVTTSS2SIZrr_Int VR128X:$src)>; + def : Pat<(i32 (int_x86_sse_cvttss2si (sse_load_f32 addr:$src))), + (VCVTTSS2SIZrm_Int addr:$src)>; def : Pat<(i64 (int_x86_sse_cvttss2si64 (v4f32 VR128X:$src))), (VCVTTSS2SI64Zrr_Int VR128X:$src)>; + def : Pat<(i64 (int_x86_sse_cvttss2si64 (sse_load_f32 addr:$src))), + (VCVTTSS2SI64Zrm_Int addr:$src)>; def : Pat<(i32 (int_x86_sse2_cvttsd2si (v2f64 VR128X:$src))), (VCVTTSD2SIZrr_Int VR128X:$src)>; + def : Pat<(i32 (int_x86_sse2_cvttsd2si (sse_load_f64 addr:$src))), + (VCVTTSD2SIZrm_Int addr:$src)>; def : Pat<(i64 (int_x86_sse2_cvttsd2si64 (v2f64 VR128X:$src))), (VCVTTSD2SI64Zrr_Int VR128X:$src)>; - + def : Pat<(i64 (int_x86_sse2_cvttsd2si64 (sse_load_f64 addr:$src))), + (VCVTTSD2SI64Zrm_Int addr:$src)>; } // HasAVX512 //===----------------------------------------------------------------------===// // AVX-512 Convert form float to double and back |

