diff options
| author | Ahmed Bougacha <ahmed.bougacha@gmail.com> | 2015-09-02 22:27:38 +0000 |
|---|---|---|
| committer | Ahmed Bougacha <ahmed.bougacha@gmail.com> | 2015-09-02 22:27:38 +0000 |
| commit | bc72ad7b27ca7bbe6d5ecf3253258736a4cf19ae (patch) | |
| tree | f9e0aa114222d23980303258ac9726ccd5addd40 | |
| parent | 9546f367f7110b17169d628a9fa66310b2c27256 (diff) | |
| download | bcm5719-llvm-bc72ad7b27ca7bbe6d5ecf3253258736a4cf19ae.tar.gz bcm5719-llvm-bc72ad7b27ca7bbe6d5ecf3253258736a4cf19ae.zip | |
[X86] Cleanup nontemporal fragments. NFCI.
We can chain other fragments to avoid repeating conditions.
This also fixes a potential bug (that realistically can't happen),
where we would match indexed nontemporal stores for i32/i64.
llvm-svn: 246719
| -rw-r--r-- | llvm/lib/Target/X86/X86InstrFragmentsSIMD.td | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/llvm/lib/Target/X86/X86InstrFragmentsSIMD.td b/llvm/lib/Target/X86/X86InstrFragmentsSIMD.td index ab5b71525c7..b8ab1feed9e 100644 --- a/llvm/lib/Target/X86/X86InstrFragmentsSIMD.td +++ b/llvm/lib/Target/X86/X86InstrFragmentsSIMD.td @@ -620,27 +620,18 @@ def memopmmx : PatFrag<(ops node:$ptr), (x86mmx (memop64 node:$ptr))>; // MOVNT Support // Like 'store', but requires the non-temporal bit to be set def nontemporalstore : PatFrag<(ops node:$val, node:$ptr), - (st node:$val, node:$ptr), [{ - if (StoreSDNode *ST = dyn_cast<StoreSDNode>(N)) - return ST->isNonTemporal(); - return false; + (store node:$val, node:$ptr), [{ + return cast<StoreSDNode>(N)->isNonTemporal(); }]>; def alignednontemporalstore : PatFrag<(ops node:$val, node:$ptr), - (st node:$val, node:$ptr), [{ - if (StoreSDNode *ST = dyn_cast<StoreSDNode>(N)) - return ST->isNonTemporal() && !ST->isTruncatingStore() && - ST->getAddressingMode() == ISD::UNINDEXED && - ST->getAlignment() >= 16; - return false; + (nontemporalstore node:$val, node:$ptr), [{ + return cast<StoreSDNode>(N)->getAlignment() >= 16; }]>; def unalignednontemporalstore : PatFrag<(ops node:$val, node:$ptr), - (st node:$val, node:$ptr), [{ - if (StoreSDNode *ST = dyn_cast<StoreSDNode>(N)) - return ST->isNonTemporal() && - ST->getAlignment() < 16; - return false; + (nontemporalstore node:$val, node:$ptr), [{ + return cast<StoreSDNode>(N)->getAlignment() < 16; }]>; def mgatherv4i32 : PatFrag<(ops node:$src1, node:$src2, node:$src3), |

