aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineFunctionPrinterPass.cpp
diff options
context:
space:
mode:
authorPhilip Reames <preames@rivosinc.com>2023-04-17 14:36:27 -0700
committerPhilip Reames <listmail@philipreames.com>2023-04-18 10:37:18 -0700
commitc37c9f2fda27b11cb405dbf458b9128632a75834 (patch)
tree8e79917e2325a0f6221dee5addba6739afe1cc85 /llvm/lib/CodeGen/MachineFunctionPrinterPass.cpp
parent790c9ac529c9ad0d7e89e3de2041d85cfc411b40 (diff)
downloadllvm-c37c9f2fda27b11cb405dbf458b9128632a75834.zip
llvm-c37c9f2fda27b11cb405dbf458b9128632a75834.tar.gz
llvm-c37c9f2fda27b11cb405dbf458b9128632a75834.tar.bz2
[DAG] Restrict (fp_round (copysign X, Y)) -> (copysign (fp_round X), Y) combine
This transformation creates an copysign node whose argument types do not match. RISCV does not handle such a case which results in a crash today. Looking at the relevant code in DAG, it looks like the process of enabling the non-matching types case was never completed for vectors at all. The transformation which triggered the RISCV crash is a specialization of another transform (specifically due to one use for profitability) which isn't enabled by default. Given that, I chose to match the preconditions for that other transform. Other options here include: * Updating RISCV codegen to handle the mismatched argument type case for vectors. This is slightly tricky as I don't see an obvious profitable lowering for this case which doesn't involve simply adding back in the round/trunc. * Disabling the transform via a target hook. This patch does involve two changes for AArch64 codegen. These could be called regressions, but well, the code after actually looks better than the code before. Differential Revision: https://reviews.llvm.org/D148638
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunctionPrinterPass.cpp')
0 files changed, 0 insertions, 0 deletions