[LLVMdev] libcalls for shifts
    Johannes Birgmeier 
    e0902998 at student.tuwien.ac.at
       
    Sat Jan  7 10:18:11 PST 2012
    
    
  
Hello,
my target has libcall support for long long shifts. I already have the 
following lines in my Lowering constructor:
   setLibcallName(RTLIB::SHL_I64, "__llshl");
   setLibcallName(RTLIB::SRL_I64, "__llshru");
   setLibcallName(RTLIB::SRA_I64, "__llshr");
and
   setOperationAction(ISD::SHL, MVT::i64, Expand);
   setOperationAction(ISD::SRA, MVT::i64, Expand);
   setOperationAction(ISD::SRL, MVT::i64, Expand);
But when I try to compile a sample program, I get the error:
NODE: 0x273c850: i64 = shl 0x273b800, 0x273be00
llc: LegalizeDAG.cpp:1011: llvm::SDValue 
{anonymous}::SelectionDAGLegalize::LegalizeOp(llvm::SDValue): Assertion 
`0 && "Do not know how to legalize this operator!"' failed.
... Well, I thought that was the way to tell LLVM to expand to a 
libcall. What's the problem? How can I convince LLVM to expand to a 
libcall here?
(ARM does intrinsics magics here. Is this the (only) way to do it?)
Regards,
Johannes
    
    
More information about the llvm-dev
mailing list