[llvm] [GISel] computeKnownBits - add CTLS handling (PR #178063)

Gergo Stomfai via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 9 00:54:31 PST 2026


================
@@ -681,6 +681,18 @@ void GISelValueTracking::computeKnownBitsImpl(Register R, KnownBits &Known,
     Known.Zero.setBitsFrom(LowBits);
     break;
   }
+  case TargetOpcode::G_CTLS: {
+    auto Reg = MI.getOperand(1).getReg();
+    unsigned MinRedundantSignBits = computeNumSignBits(Reg, Depth + 1) - 1;
+
+    unsigned MaxUpperRedundantSignBits = MRI.getType(Reg).getScalarSizeInBits();
----------------
stomfaig wrote:

In that case, I believe that this mr is ready?

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


More information about the llvm-commits mailing list