From a24e7f7d8cc7f1e4e1582cb2f3ef9748d92fd7e4 Mon Sep 17 00:00:00 2001 From: Daniel Sanders Date: Fri, 22 Nov 2013 15:47:18 +0000 Subject: [PATCH] [mips][msa] Add test case that should have been added in r195456. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195469 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../msa/llvm-stress-s2090927243-simplified.ll | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 test/CodeGen/Mips/msa/llvm-stress-s2090927243-simplified.ll diff --git a/test/CodeGen/Mips/msa/llvm-stress-s2090927243-simplified.ll b/test/CodeGen/Mips/msa/llvm-stress-s2090927243-simplified.ll new file mode 100644 index 00000000000..38113143e6d --- /dev/null +++ b/test/CodeGen/Mips/msa/llvm-stress-s2090927243-simplified.ll @@ -0,0 +1,31 @@ +; RUN: llc -march=mips < %s +; RUN: llc -march=mips -mattr=+msa,+fp64 < %s +; RUN: llc -march=mipsel < %s +; RUN: llc -march=mipsel -mattr=+msa,+fp64 < %s + +; This test originally failed for MSA with a "Cannot select ..." error. +; This was because undef's are ignored when checking if a vector constant is a +; splat, but are legalized to zero if left in the DAG which changes the constant +; into a non-splat. +; +; It should at least successfully build. + +define void @autogen_SD2090927243() { +BB: + br label %CF77 + +CF77: ; preds = %CF77, %CF80 + %Shuff27 = shufflevector <16 x i8> , + <16 x i8> , + <16 x i32> + %ZE30 = zext <16 x i8> %Shuff27 to <16 x i32> + %Cmp32 = fcmp ueq float undef, 0x3CDA6E5E40000000 + br i1 %Cmp32, label %CF77, label %CF + +CF: ; preds = %CF, %CF81 + %E48 = extractelement <16 x i32> %ZE30, i32 14 + br i1 undef, label %CF, label %CF78 + +CF78: ; preds = %CF + ret void +}