Skip to content

Commit ce8e208

Browse files
exscapedylanmckay
authored andcommitted
[AVR] Implement getCmpLibcallReturnType().
This fixes the issue (rust-lang#75) with floating-point comparisons generating broken code. By default, LLVM assumes these comparisons return 32-bit values, but ours are 8-bit.
1 parent 1e9daa0 commit ce8e208

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/Target/AVR/AVRISelLowering.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,11 @@ class AVRTargetLowering : public TargetLowering {
7575
MVT getScalarShiftAmountTy(const DataLayout &, EVT LHSTy) const override {
7676
return MVT::i8;
7777
}
78+
79+
MVT::SimpleValueType getCmpLibcallReturnType() const override {
80+
return MVT::i8;
81+
}
82+
7883
const char *getTargetNodeName(unsigned Opcode) const override;
7984

8085
SDValue LowerOperation(SDValue Op, SelectionDAG &DAG) const override;

0 commit comments

Comments
 (0)