[PATCH] D82552: [CodeGen] Matching promoted type for 16-bit integer bitcasts from fp16 operand

Lucas Prates via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 25 10:14:21 PDT 2020


pratlucas added a comment.

The issue happens when creating the `ISD::FP_TO_FP16` in case the input is a constant.
It tries to generate the new 16-bit constant but the `NOutVT` type passed to `DAG.getNode` has 32-bits, which causes the assertion in `SelectionDAG.cpp:1307` to fail:

  llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1307: llvm::SDValue llvm::SelectionDAG::getConstant(const llvm::ConstantInt &, const llvm::SDLoc &, llvm::EVT, bool, bool): Assertion `Elt->getBitWidth() == EltVT.getSizeInBits() && "APInt size does not match type size!"' failed.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82552/new/

https://reviews.llvm.org/D82552





More information about the llvm-commits mailing list