From 1ee2434eb56cc492dcc2329eeb8d8d2dc31851aa Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sun, 8 Nov 2020 12:47:35 +0000 Subject: [PATCH] Merge commit 354d3106c from llvm git (by Kai Luo): [PowerPC] Skip combining (uint_to_fp x) if x is not simple type Current powerpc64le backend hits ``` Combining: t7: f64 = uint_to_fp t6 llc: llvm-project/llvm/include/llvm/CodeGen/ValueTypes.h:291: llvm::MVT llvm::EVT::getSimpleVT() const: Assertion `isSimple() && "Expected a SimpleValueType!"' failed. ``` This patch fixes it by skipping combination if `t6` is not simple type. Fixed https://bugs.llvm.org/show_bug.cgi?id=47660. Reviewed By: #powerpc, steven.zhang Differential Revision: https://reviews.llvm.org/D88388 This should fix the llvm assertion mentioned above when building the following ports for powerpc64le: * audio/traverso * databases/percona57-pam-for-mysql * databases/percona57-server * emulators/citra * emulators/citra-qt5 * games/7kaa * graphics/dia * graphics/mandelbulber * graphics/pcl-pointclouds * net-p2p/libtorrent-rasterbar * textproc/htmldoc Requested by: pkubaj MFC after: 3 days --- .../llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp b/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp index f54f1673526..641b2facdc4 100644 --- a/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp +++ b/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCISelLowering.cpp @@ -14257,6 +14257,8 @@ SDValue PPCTargetLowering::combineFPToIntToFP(SDNode *N, // from the hardware. if (Op.getValueType() != MVT::f32 && Op.getValueType() != MVT::f64) return SDValue(); + if (!Op.getOperand(0).getValueType().isSimple()) + return SDValue(); if (Op.getOperand(0).getValueType().getSimpleVT() <= MVT(MVT::i1) || Op.getOperand(0).getValueType().getSimpleVT() > MVT(MVT::i64)) return SDValue(); -- 2.45.0