[llvm] [SPIRV] Support G_IS_FPCLASS (PR #148637)

Fraser Cormack via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 28 04:21:12 PDT 2025


================
@@ -0,0 +1,367 @@
+; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv64-unknown-unknown %s -o - | FileCheck %s
----------------
frasercrmck wrote:

Good idea, thanks. I've added `@isfpclass_1_isnan_or_normal`. Turns out there actually aren't redundant `OpBitwiseAnd` being generated.

The worst thing I've seen is the redundant `OpLogicalOr %[[#BoolTy]] %[[#False]] %[[#T2]]` everywhere. Those would ideally be optimized out, perhaps either at the point of creation or after ISel. I thought I'd leave that for future work.

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


More information about the llvm-commits mailing list