diff options
| author | Michael Kuperstein <mkuper@google.com> | 2016-07-13 23:23:40 +0000 |
|---|---|---|
| committer | Michael Kuperstein <mkuper@google.com> | 2016-07-13 23:23:40 +0000 |
| commit | be837fa40f12543ea4120cdd09ffcfc2535b13c5 (patch) | |
| tree | 956e4206a3340a645922bc0801aa3ef88e78a2d5 /llvm/test | |
| parent | 296e9785ba820372831ef7a74f93a4399507d3eb (diff) | |
| download | bcm5719-llvm-be837fa40f12543ea4120cdd09ffcfc2535b13c5.tar.gz bcm5719-llvm-be837fa40f12543ea4120cdd09ffcfc2535b13c5.zip | |
[DAG] Correctly chain masked loads
If a masked loads is not added to the chain, it should not reset the chain's
root.
This fixes the remaining part of PR28515.
llvm-svn: 275340
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/CodeGen/X86/pr28515.ll | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/pr28515.ll b/llvm/test/CodeGen/X86/pr28515.ll new file mode 100644 index 00000000000..1fad2650666 --- /dev/null +++ b/llvm/test/CodeGen/X86/pr28515.ll @@ -0,0 +1,16 @@ +; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -mattr=+avx2 | FileCheck %s + +@0 = private constant [8 x i32] zeroinitializer + +; CHECK-LABEL: foo: +; CHECK: movl %esi, (%rdi) +; CHECK-NEXT: retq +define void @foo(i32* %p, i32 %v, <8 x i1> %mask) { + store i32 %v, i32* %p + %wide.masked.load = call <8 x i32> @llvm.masked.load.v8i32.p0v8i32(<8 x i32>* bitcast (i32* getelementptr ([8 x i32], [8 x i32]* @0, i64 0, i64 0) to <8 x i32>*), i32 4, <8 x i1> %mask, <8 x i32> undef) + ret void +} + +declare <8 x i32> @llvm.masked.load.v8i32.p0v8i32(<8 x i32>*, i32, <8 x i1>, <8 x i32>) #0 + +attributes #0 = { argmemonly nounwind readonly } |

