From d6aa26f4422f4fe96bf53b6a9edc73dcc2f5092a Mon Sep 17 00:00:00 2001 From: Dylan McKay Date: Sun, 24 Sep 2017 01:07:26 +0000 Subject: [PATCH] [AVR] Implement getCmpLibcallReturnType(). This fixes the avr-rust issue (#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 --- lib/Target/AVR/AVRISelLowering.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/Target/AVR/AVRISelLowering.h b/lib/Target/AVR/AVRISelLowering.h index 37e01dc950f..c13a8b3bc8c 100644 --- a/lib/Target/AVR/AVRISelLowering.h +++ b/lib/Target/AVR/AVRISelLowering.h @@ -75,6 +75,11 @@ public: MVT getScalarShiftAmountTy(const DataLayout &, EVT LHSTy) const override { return MVT::i8; } + + MVT::SimpleValueType getCmpLibcallReturnType() const override { + return MVT::i8; + } + const char *getTargetNodeName(unsigned Opcode) const override; SDValue LowerOperation(SDValue Op, SelectionDAG &DAG) const override; -- 2.11.0