diff options
| author | Andrew V. Tischenko <andrew.v.tischenko@gmail.com> | 2017-04-14 09:17:09 +0000 |
|---|---|---|
| committer | Andrew V. Tischenko <andrew.v.tischenko@gmail.com> | 2017-04-14 09:17:09 +0000 |
| commit | 4e7bcd5216afb5e380fe21bfa7401253d9046138 (patch) | |
| tree | 81c8331001e95200b8d70ee7ee072a1971e17805 /llvm/test/CodeGen | |
| parent | 1a1678e7eb6ee3a865c7bdc2d07f37c8d2c08ef4 (diff) | |
| download | bcm5719-llvm-4e7bcd5216afb5e380fe21bfa7401253d9046138.tar.gz bcm5719-llvm-4e7bcd5216afb5e380fe21bfa7401253d9046138.zip | |
Fix for PR#30562: Selection DAG error: Detected cycle in SelectionDAG.
Patch by Dinar Temirbulatov
llvm-svn: 300314
Diffstat (limited to 'llvm/test/CodeGen')
| -rw-r--r-- | llvm/test/CodeGen/X86/pr30562.ll | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/pr30562.ll b/llvm/test/CodeGen/X86/pr30562.ll new file mode 100644 index 00000000000..dda736a1a18 --- /dev/null +++ b/llvm/test/CodeGen/X86/pr30562.ll @@ -0,0 +1,22 @@ +; RUN: llc < %s -mtriple=x86_64-unknown-unknown | FileCheck %s + +define i32 @foo(i64* nocapture %perm, i32 %n) { +entry: + br label %body + +body: +; CHECK-LABEL: foo: +; CHECK: pslldq $8, %xmm0 + %vec.ind = phi <2 x i64> [ <i64 0, i64 1>, %entry ], [ <i64 2, i64 3>, %body ] + %l13 = extractelement <2 x i64> %vec.ind, i32 %n + %l14 = getelementptr inbounds i64, i64* %perm, i64 %l13 + %l15 = bitcast i64* %l14 to <2 x i64>* + store <2 x i64> %vec.ind, <2 x i64>* %l15, align 8 + %niter.ncmp.3 = icmp eq i64 %l13, 0 + br i1 %niter.ncmp.3, label %exit, label %body + +exit: + ret i32 %n + +} + |

