[llvm] [ConstantFold] Consider inttoptr, ptrtoaddr is valid cast pair (PR #161087)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 28 09:36:40 PDT 2025


================
@@ -2878,7 +2879,7 @@ unsigned CastInst::isEliminableCastPair(
     { 99,99,99, 2, 2,99,99, 8, 2,99,99,99, 4, 0}, // FPExt          |
     {  1, 0, 0,99,99, 0, 0,99,99,99,99, 7, 3, 0}, // PtrToInt       |
     {  1, 0, 0,99,99, 0, 0,99,99,99,99, 0, 3, 0}, // PtrToAddr      |
-    { 99,99,99,99,99,99,99,99,99,11,99,99,15, 0}, // IntToPtr       |
+    { 99,99,99,99,99,99,99,99,99,11, 0,99,15, 0}, // IntToPtr       |
----------------
nikic wrote:

Shouldn't this be 11?

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


More information about the llvm-commits mailing list