[llvm] [llubi] Implement intrinsics for integer arithmetic/bit manipulation (PR #193702)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 23 02:58:47 PDT 2026


================
@@ -381,6 +472,171 @@ class InstExecutor : public InstVisitor<InstExecutor, void>,
       }
       return AnyValue();
     }
+    case Intrinsic::ssa_copy:
+    case Intrinsic::expect:
+    case Intrinsic::expect_with_probability:
+      return getValue(CB.getArgOperand(0));
+    case Intrinsic::donothing:
+      return AnyValue();
+    case Intrinsic::vscale:
+      return APInt(RetTy->getScalarSizeInBits(), Ctx.getVScale());
+    case Intrinsic::abs: {
+      const bool IsIntMinPoison =
+          getBooleanNonPoison(getValue(CB.getArgOperand(1)).asBoolean());
----------------
nikic wrote:

I think for immarg arguments it may make more sense to directly access it on the instruction instead of going through getValue().

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


More information about the llvm-commits mailing list