diff options
author | Craig Topper <craig.topper@intel.com> | 2018-06-14 03:16:58 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@intel.com> | 2018-06-14 03:16:58 +0000 |
commit | f8041bd42d0a9e1e86d983bca9fdd4334eeb0a67 (patch) | |
tree | aa2b1f9e9669b077922e6588d2bd35af3d89b702 /llvm/lib/Target/X86/X86InstrMMX.td | |
parent | fbf3dac5db6695b28a5ef0b3b81d9d176f660806 (diff) |
[x86] fix mappings of cvttp2si/cvttp2ui x86 intrinsics to x86-specific nodes and isel patterns (PR37551)
Summary:
The tests in:
https://bugs.llvm.org/show_bug.cgi?id=37751
...show miscompiles because we wrongly mapped and folded x86-specific intrinsics into generic DAG nodes.
This patch corrects the mappings in X86IntrinsicsInfo.h and adds isel matching corresponding to the new patterns. The complete tests for the failure cases should be in avx-cvttp2si.ll and sse-cvttp2si.ll and avx512-cvttp2i.ll
Reviewers: RKSimon, gbedwell, spatel
Reviewed By: spatel
Subscribers: mcrosier, llvm-commits
Differential Revision: https://reviews.llvm.org/D47993
Diffstat (limited to 'llvm/lib/Target/X86/X86InstrMMX.td')
-rw-r--r-- | llvm/lib/Target/X86/X86InstrMMX.td | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/X86InstrMMX.td b/llvm/lib/Target/X86/X86InstrMMX.td index 0c25c4e187d..c0d6b070c86 100644 --- a/llvm/lib/Target/X86/X86InstrMMX.td +++ b/llvm/lib/Target/X86/X86InstrMMX.td @@ -603,6 +603,9 @@ def : Pat<(x86mmx (MMX_X86movdq2q (bc_v2i64 (v4i32 (X86cvtp2Int (v4f32 VR128:$src)))))), (MMX_CVTPS2PIirr VR128:$src)>; def : Pat<(x86mmx (MMX_X86movdq2q + (bc_v2i64 (v4i32 (X86cvttp2si (v4f32 VR128:$src)))))), + (MMX_CVTTPS2PIirr VR128:$src)>; +def : Pat<(x86mmx (MMX_X86movdq2q (bc_v2i64 (v4i32 (fp_to_sint (v4f32 VR128:$src)))))), (MMX_CVTTPS2PIirr VR128:$src)>; def : Pat<(x86mmx (MMX_X86movdq2q |