[LLVMbugs] [Bug 6960] New: x86 codegen: vectors don't work on non-SSE CPUs
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Apr 28 01:31:36 PDT 2010
http://llvm.org/bugs/show_bug.cgi?id=6960
Summary: x86 codegen: vectors don't work on non-SSE CPUs
Product: libraries
Version: 2.7
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: Backend: X86
AssignedTo: unassignedbugs at nondot.org
ReportedBy: edwintorok at gmail.com
CC: llvmbugs at cs.uiuc.edu
Created an attachment (id=4751)
--> (http://llvm.org/bugs/attachment.cgi?id=4751)
bitcode
Reported on #dri-devel, that softpipe/llvmpipe in mesa crashes like this, on a
CPU without SSE or SSE2:
#
glxgears: X86ISelLowering.cpp:6058: llvm::SDValue
llvm::X86TargetLowering::LowerVSETCC(llvm::SDValue, llvm::SelectionDAG&):
Assertion `VT0 == MVT::v4f32 || VT0 == MVT::v2f64' failed.
#
Stack dump:
#
0. Running pass 'X86 DAG->DAG Instruction Selection' on function
'@draw_llvm_shader'
I dumped the module generated by mesa, and attached it here.
You can reproduce the bug like this (on llvm 2.7):
$ llc l.bc -march=x86 -mattr=-sse
UNREACHABLE executed!
0 llc 0x08631db9
Stack dump:
0. Program arguments: /home/edwin/llvm-git/obj32/Release-Asserts/bin/llc
l.bc -march=x86 -mattr=-sse
1. Running pass 'X86 DAG->DAG Instruction Selection' on function
'@draw_llvm_shader'
Aborted
And like this:
$ llc l.bc -march=x86 -mattr=-sse2
LLVM ERROR: Cannot yet select: 0x9d86fe4: v2i32 = X86ISD::CMPPD 0x9d98964,
0x9d7eccc, 0x9d7308c [ID=518]
0x9d98964: v2f32 = bit_convert 0x9d988e0 [ID=512]
0x9d988e0: v1i64,ch = load 0x9d98754, 0x9d987d8, 0x9d7d344<LD8[<unknown>]>
[ID=506]
0x9d98754: ch = store 0x9d54080, 0x9d88918, 0x9d986d0,
.....
/proc/cpuinfo:
#
processor : 0
#
vendor_id : AuthenticAMD
#
cpu family : 6
#
model : 3
#
model name : AMD Duron(tm) Processor
#
stepping : 1
#
cpu MHz : 950.024
#
cache size : 64 KB
#
fdiv_bug : no
#
hlt_bug : no
#
f00f_bug : no
#
coma_bug : no
#
fpu : yes
#
fpu_exception : yes
#
cpuid level : 1
#
wp : yes
#
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
pat pse36 mmx fxsr syscall mmxext 3dnowext 3dnow up
#
bogomips : 1900.04
#
clflush size : 32
#
cache_alignment : 32
#
address sizes : 36 bits physical, 32 bits virtual
#
power management:
For reference here is how I dumped the module:
diff --git a/src/gallium/auxiliary/draw/draw_llvm.c
b/src/gallium/auxiliary/draw/draw_llvm.c
index 2738322..8e0a939 100644
--- a/src/gallium/auxiliary/draw/draw_llvm.c
+++ b/src/gallium/auxiliary/draw/draw_llvm.c
@@ -179,6 +179,7 @@ draw_llvm_create(struct draw_context *draw)
llvm->pass = LLVMCreateFunctionPassManager(llvm->provider);
LLVMAddTargetData(llvm->target, llvm->pass);
+ fprintf(stderr, "%s\n", LLVMCopyStringRepOfTargetData(llvm->target));
/* These are the passes currently listed in llvm-c/Transforms/Scalar.h,
* but there are more on SVN. */
/* TODO: Add more passes */
@@ -694,6 +695,7 @@ draw_llvm_generate(struct draw_llvm *llvm, struct
draw_llvm_variant *variant)
debug_printf("\n");
}
variant->jit_func =
(draw_jit_vert_func)LLVMGetPointerToGlobal(llvm->draw->engine,
variant->function);
+ LLVMDumpModule(llvm->module);
if (0)
lp_disassemble(variant->jit_func);
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list