[LLVMdev] "Cannot select" error in 2.9
gjunker at dayark.com
Sat Jul 30 15:26:11 PDT 2011
> -----Original Message-----
> From: Nick Lewycky [mailto:nicholas at mxc.ca]
> Sent: Saturday, July 30, 2011 2:36 PM
> To: Gregory Junker
> Cc: 'Rotem, Nadav'; llvmdev at cs.uiuc.edu
> Subject: Re: [LLVMdev] "Cannot select" error in 2.9
> Gregory Junker wrote:
> >>> -----Original Message-----
> >>> From: Rotem, Nadav [mailto:nadav.rotem at intel.com]
> >>> Sent: Saturday, July 30, 2011 6:51 AM
> >>> To: Gregory Junker
> >>> Subject: RE: [LLVMdev] "Cannot select" error in 2.9
> >>> Can you reduce the test with bug-point ? Does it work on ToT ?
> >> Hi Nadav
> >> I'm not sure what those are -- can you clarify?
> > OK bugpoint was simple enough to figure out -- it tells me
> > bugpoint: test.ll:2:12: error: invalid operand type for instruction
> > %1 = add double %f0, %f1
> > That doesn't make a lot of sense to me -- LLVM can't add doubles?
> No, LLVM can't, but it can fadd them. ;) "add" only accepts integers
> vectors of integers, "fadd" accepts floats and vectors of floats. See
> their entries in the language reference:
> add: http://llvm.org/docs/LangRef.html#i_add
> fadd: http://llvm.org/docs/LangRef.html#i_fadd
> The split is intended to let us add additional properties to integer
> adds (like the nuw/nsw bits documented) that don't apply to floats, and
> properties to floats (rounding modes) that don't apply to ints.
Yup, that sorted it for me -- thanks Nick and Nadav for pointing me in the
More information about the llvm-dev