OSDN Git Service

[x86] fix mappings of cvttp2si/cvttp2ui x86 intrinsics to x86-specific nodes and...
authorCraig Topper <craig.topper@intel.com>
Thu, 14 Jun 2018 03:16:58 +0000 (03:16 +0000)
committerCraig Topper <craig.topper@intel.com>
Thu, 14 Jun 2018 03:16:58 +0000 (03:16 +0000)
commit3a81c6c69761df3f6788ba486c69cc09a36bd7a1
treeeb2f38a03f86162b60a2c1e0a679d176997629fb
parentfce447566ae7dbba02d83c7146eb38aa4360994c
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334685 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86InstrAVX512.td
lib/Target/X86/X86InstrMMX.td
lib/Target/X86/X86InstrSSE.td
lib/Target/X86/X86IntrinsicsInfo.h
test/CodeGen/X86/avx-cvttp2si.ll
test/CodeGen/X86/avx512-cvttp2i.ll
test/CodeGen/X86/sse-cvttp2si.ll