[llvm] [LLVM] Slay undead copysign code (PR #111269)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 14 01:18:51 PDT 2024
================
@@ -1649,12 +1649,19 @@ void DAGTypeLegalizer::ExpandFloatRes_FCEIL(SDNode *N,
void DAGTypeLegalizer::ExpandFloatRes_FCOPYSIGN(SDNode *N,
SDValue &Lo, SDValue &Hi) {
- ExpandFloatRes_Binary(N, GetFPLibCall(N->getValueType(0),
- RTLIB::COPYSIGN_F32,
- RTLIB::COPYSIGN_F64,
- RTLIB::COPYSIGN_F80,
- RTLIB::COPYSIGN_F128,
- RTLIB::COPYSIGN_PPCF128), Lo, Hi);
+
+ assert(N->getValueType(0) == MVT::ppcf128 &&
+ "Logic only correct for ppcf128!");
+ SDLoc DL = SDLoc(N);
+ SDValue Tmp = SDValue();
----------------
workingjubilee wrote:
The LLVM style guide specifically said I should "[Use auto Type Deduction to Make Code More Readable](https://llvm.org/docs/CodingStandards.html#id29)". So I did. Then I was advised to not. So I accepted that.
But I find these changes make the code **significantly** harder to read.
Are you aware of another programming language that implements this... _most vexing_ constructor form?
https://github.com/llvm/llvm-project/pull/111269
More information about the llvm-commits
mailing list