summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDylan McKay <me@dylanmckay.io>2017-09-24 01:07:26 +0000
committerDylan McKay <me@dylanmckay.io>2017-09-24 01:07:26 +0000
commitf9e291a2f655c0859bf64c2d700266f864c0e6b5 (patch)
treeb8e63def0c19acec7470ec8b7cd19b6183efbe87
parent212211915096b22f5dfa32cc554aadaf17fb8ba4 (diff)
downloadbcm5719-llvm-f9e291a2f655c0859bf64c2d700266f864c0e6b5.tar.gz
bcm5719-llvm-f9e291a2f655c0859bf64c2d700266f864c0e6b5.zip
[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. llvm-svn: 314070
-rw-r--r--llvm/lib/Target/AVR/AVRISelLowering.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Target/AVR/AVRISelLowering.h b/llvm/lib/Target/AVR/AVRISelLowering.h
index 37e01dc950f..c13a8b3bc8c 100644
--- a/llvm/lib/Target/AVR/AVRISelLowering.h
+++ b/llvm/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;
OpenPOWER on IntegriCloud