aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2010-11-19 21:49:38 +0000
committerDale Johannesen <dalej@apple.com>2010-11-19 21:49:38 +0000
commit76eb5f2401125c358eaf5e97a223a78ad4cc99e9 (patch)
treef1b340da40b6e4f4f6a413f3e4857386a944ce04
parent953557f445ba749e0ec95e43bc5143849d1fd99b (diff)
downloadexternal_llvm-76eb5f2401125c358eaf5e97a223a78ad4cc99e9.zip
external_llvm-76eb5f2401125c358eaf5e97a223a78ad4cc99e9.tar.gz
external_llvm-76eb5f2401125c358eaf5e97a223a78ad4cc99e9.tar.bz2
Prefetch has a MemOperand now. FileCheckize a test.
This finishes up 8460971. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119848 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/Target/TargetSelectionDAG.td3
-rw-r--r--test/CodeGen/X86/prefetch.ll10
2 files changed, 7 insertions, 6 deletions
diff --git a/include/llvm/Target/TargetSelectionDAG.td b/include/llvm/Target/TargetSelectionDAG.td
index 7315e52..ebb0624 100644
--- a/include/llvm/Target/TargetSelectionDAG.td
+++ b/include/llvm/Target/TargetSelectionDAG.td
@@ -375,7 +375,8 @@ def trap : SDNode<"ISD::TRAP" , SDTNone,
[SDNPHasChain, SDNPSideEffect]>;
def prefetch : SDNode<"ISD::PREFETCH" , SDTPrefetch,
- [SDNPHasChain, SDNPMayLoad, SDNPMayStore]>;
+ [SDNPHasChain, SDNPMayLoad, SDNPMayStore,
+ SDNPMemOperand]>;
def membarrier : SDNode<"ISD::MEMBARRIER" , SDTMemBarrier,
[SDNPHasChain, SDNPSideEffect]>;
diff --git a/test/CodeGen/X86/prefetch.ll b/test/CodeGen/X86/prefetch.ll
index fac5915..48d2673 100644
--- a/test/CodeGen/X86/prefetch.ll
+++ b/test/CodeGen/X86/prefetch.ll
@@ -1,11 +1,11 @@
-; RUN: llc < %s -march=x86 -mattr=+sse > %t
-; RUN: grep prefetchnta %t
-; RUN: grep prefetcht0 %t
-; RUN: grep prefetcht1 %t
-; RUN: grep prefetcht2 %t
+; RUN: llc < %s -march=x86 -mattr=+sse | FileCheck %s
define void @t(i8* %ptr) nounwind {
entry:
+; CHECK: prefetcht2
+; CHECK: prefetcht1
+; CHECK: prefetcht0
+; CHECK: prefetchnta
tail call void @llvm.prefetch( i8* %ptr, i32 0, i32 1 )
tail call void @llvm.prefetch( i8* %ptr, i32 0, i32 2 )
tail call void @llvm.prefetch( i8* %ptr, i32 0, i32 3 )