[llvm-commits] [llvm] r136130 - in /llvm/trunk: lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp test/CodeGen/X86/split-vector-bitcast.ll
Eli Friedman
eli.friedman at gmail.com
Tue Jul 26 13:38:50 PDT 2011
Author: efriedma
Date: Tue Jul 26 15:38:49 2011
New Revision: 136130
URL: http://llvm.org/viewvc/llvm-project?rev=136130&view=rev
Log:
Add obvious missing case to switch. PR10497.
Added:
llvm/trunk/test/CodeGen/X86/split-vector-bitcast.ll
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp?rev=136130&r1=136129&r2=136130&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp Tue Jul 26 15:38:49 2011
@@ -524,12 +524,11 @@
// Handle some special cases efficiently.
switch (getTypeAction(InVT)) {
- default:
- assert(false && "Unknown type action!");
case TargetLowering::TypeLegal:
case TargetLowering::TypePromoteInteger:
case TargetLowering::TypeSoftenFloat:
case TargetLowering::TypeScalarizeVector:
+ case TargetLowering::TypeWidenVector:
break;
case TargetLowering::TypeExpandInteger:
case TargetLowering::TypeExpandFloat:
Added: llvm/trunk/test/CodeGen/X86/split-vector-bitcast.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/split-vector-bitcast.ll?rev=136130&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/X86/split-vector-bitcast.ll (added)
+++ llvm/trunk/test/CodeGen/X86/split-vector-bitcast.ll Tue Jul 26 15:38:49 2011
@@ -0,0 +1,12 @@
+; RUN: llc < %s -march=x86 -mattr=-sse2,+sse | grep addps
+
+; PR10497
+; (This is primarily checking that this construct doesn't crash.)
+define void @a(<2 x float>* %a, <2 x i32>* %b) {
+ %cc = load <2 x float>* %a
+ %c = fadd <2 x float> %cc, %cc
+ %dd = bitcast <2 x float> %c to <2 x i32>
+ %d = add <2 x i32> %dd, %dd
+ store <2 x i32> %d, <2 x i32>* %b
+ ret void
+}
More information about the llvm-commits
mailing list