llvm-project
c2f0af51 - [GISelValueTracking] Add test case for G_PTRTOINT

Commit
45 days ago
[GISelValueTracking] Add test case for G_PTRTOINT While we can only reason about the index/address, the G_PTRTOINT operations returns all representation bits, so we can't assume the remaining ones are all zeroes. This behaviour was clarified as part of the discussion in https://discourse.llvm.org/t/clarifiying-the-semantics-of-ptrtoint/83987/54. The LangRef semantics of ptrtoint being a full representation bitcast were documented in https://github.com/llvm/llvm-project/pull/139349. Prior to 77c8d214131e951e3d3a07b45a7436f54988d6f3 we were incorrectly assuming known zeroes beyond the index size even if the input was completely unknown. This commit adds a test case for G_PTRTOINT which was omitted from that change. See https://github.com/llvm/llvm-project/issues/139598 Reviewed By: arsenm Pull Request: https://github.com/llvm/llvm-project/pull/139608
Author
Parents
  • llvm/test/CodeGen/AMDGPU/GlobalISel
    • knownbits-ptrtoint.mir