[LLVMdev] Promote MVT::f32 load/store to MVT::i32 cause infinite loop in LegalizeDAG?

Francois Pichet pichet2000 at gmail.com
Mon Aug 5 11:09:58 PDT 2013


On my target store/load of f32 or i32 are equivalents.
Previously I had duplicate instructions def in .td to map f32 and i32 to
the same opcode.

I deleted all that and I instead tried a new approach (to simplify things) :

  setOperationAction(ISD::STORE, MVT::f32, Promote);
  AddPromotedToType(ISD::STORE, MVT::f32, MVT::i32);
  setOperationAction(ISD::LOAD, MVT::f32, Promote);
  AddPromotedToType(ISD::LOAD, MVT::f32, MVT::i32);

Now SelectionDAGLegalize::LegalizeDAG() get stuck into an infinite loop.
What is going on?

I still have the following:(but I think that's fine)
  addRegisterClass(MVT::f32, &Opus::GR32RegClass);

Thanks.
(My LLVM is ~3 months old)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130805/90d2ec3b/attachment.html>


More information about the llvm-dev mailing list