[llvm] [GISel][RISCV] Legalize `G_FREM` to use fmod (PR #93063)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Thu May 23 06:05:55 PDT 2024


================
@@ -0,0 +1,51 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
+; RUN: llc -mtriple=riscv32 -global-isel -verify-machineinstrs < %s \
+; RUN:   | FileCheck %s --check-prefix=RV32
+; RUN: llc -mtriple=riscv64 -global-isel -verify-machineinstrs < %s \
+; RUN:   | FileCheck %s --check-prefix=RV64
+
----------------
dtcxzyw wrote:

> You can work around that with i16 and bitcast to half

I mean widening half to float will introduce G_FPTRUNC and G_FPEXT.
https://github.com/llvm/llvm-project/blob/32c3561d44aa792ef08d72b5a4c342c9965bc4c2/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp#L2891-L2917

https://github.com/llvm/llvm-project/pull/93063


More information about the llvm-commits mailing list