ldc-developers / ldc

The LLVM-based D Compiler.
http://wiki.dlang.org/LDC
Other
1.21k stars 262 forks source link

PPC64: Assertion failure in toir.cpp #1652

Open redstar opened 8 years ago

redstar commented 8 years ago

On PPC64 there is an assertion failure while compiling std.math:

ldc2: /opt/llvm/include/llvm/IR/Instructions.h:1113: void llvm::ICmpInst::AssertOK(): Assertion `(getOperand(0)->getType()->isIntOrIntVectorTy() || getOperand(0)->getType()->isPtrOrPtrVectorTy()) && "Invalid operand types for ICmp instruction"' failed.

In toir.cpp, line 1195, an ICmp instruction is generated. The assertion is triggered because both operands have floating point type.

redstar commented 8 years ago

It turns out that there is still an ABI problem with ppc/ppc64. I fixed most of it but not yet everything.

redstar commented 8 years ago

The ABI fixes are now good enough that LDC can compile itself. There's still an error left...

JohanEngelen commented 7 years ago

@redstar What's the status of this?