[PATCH] D15047: [Mips64] Fix extension of 32-bit integer types.

Daniel Sanders via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 30 08:45:24 PST 2015


dsanders added a dependency: D14612: [mips] Use multiclass patterns for f32/f64 comparisons and i32 selects..
dsanders added a comment.

In http://reviews.llvm.org/D15047#298544, @vradosavljevic wrote:

> In http://reviews.llvm.org/D15047#298514, @dsanders wrote:
>
> > This is the same problem Vasileios ran into when he removed some redundant sign extends. The root of the problem is that the legalized SelectionDAG isn't actually legal for MIPS64 since we don't have any 32-bit comparison operations (setlt and friends compare GPR-width values and produce a GPR-width 0 or 1). The legalizer should be promoting both the operands and result of the setcc to i64 which will result in the following DAG:
>
>
> I applied D10970 <http://reviews.llvm.org/D10970>, but i got compiler error:
>  llvm/lib/Target/Mips/Mips64r6InstrInfo.td:134:11: error: Couldn't find multiclass 'Cmp_Pats'


It depends on http://reviews.llvm.org/D14612 so you need to apply that first.

> What should we do about the problem where operand for truncate instruction is in another basic block?


It's the same issue, the sign extend is missing because our legalized SelectionDAG is actually illegal for MIPS64. It will be fixed by promoting the setcc to i64.


Repository:
  rL LLVM

http://reviews.llvm.org/D15047





More information about the llvm-commits mailing list