]> granicus.if.org Git - llvm/commitdiff
[AVR] Implement getCmpLibcallReturnType().
authorDylan McKay <me@dylanmckay.io>
Sun, 24 Sep 2017 01:07:26 +0000 (01:07 +0000)
committerDylan McKay <me@dylanmckay.io>
Sun, 24 Sep 2017 01:07:26 +0000 (01:07 +0000)
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

index 37e01dc950f520eb8b4832e54e5995125a9a6360..c13a8b3bc8cfe7edb3e82b24f56cc43db53f953d 100644 (file)
@@ -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;