[llvm] r314070 - [AVR] Implement getCmpLibcallReturnType().
Dylan McKay via llvm-commits
llvm-commits at lists.llvm.org
Sat Sep 23 18:07:26 PDT 2017
Author: dylanmckay
Date: Sat Sep 23 18:07:26 2017
New Revision: 314070
URL: http://llvm.org/viewvc/llvm-project?rev=314070&view=rev
Log:
[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.
Modified:
llvm/trunk/lib/Target/AVR/AVRISelLowering.h
Modified: llvm/trunk/lib/Target/AVR/AVRISelLowering.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AVR/AVRISelLowering.h?rev=314070&r1=314069&r2=314070&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AVR/AVRISelLowering.h (original)
+++ llvm/trunk/lib/Target/AVR/AVRISelLowering.h Sat Sep 23 18:07:26 2017
@@ -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;
More information about the llvm-commits
mailing list