Skip to content

Commit 8c51df6

Browse files
author
dylanmckay
committed
[AVR] Implement getCmpLibcallReturnType().
This fixes the avr-rust 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. Patch By Thomas Backman. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@314070 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent edee6db commit 8c51df6

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)