LLVM ERROR: No such instruction: `vmovsd ...' ?


I am running a i7 MacBook Pro 2011. If I write:

@g = global double 0.000000e+00

define i32 @main() {
  %0 = load double* @g
  %1 = fmul double 1.000000e+06, %0
  store double %1, double* @g
  ret i32 0

in test.ll and I run

llc test.ll
gcc test.s

I get:

test.s:12:no such instruction: `vmovsd _g(%rip), %xmm0'
test.s:13:no such instruction: `vmulsd LCPI0_0(%rip), %xmm0,%xmm0'
test.s:14:no such instruction: `vmovsd %xmm0, _g(%rip)'

I'm completely puzzled. Help?


It looks like llc is generating AVX instructions. IIRC, it isn't
supposed to at the moment if you don't explicitly request it; what
version are you using?


Hi Eli,

I'm using 2.8.

Ouch; too late to fix 2.8 :(. If you can, use trunk or the 2.9 branch
instead. Otherwise, passing -mattr=-avx to llc should do the trick.