[PATCH] D105088: [InstCombine] Fold IntToPtr/PtrToInt to bitcast

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 7 13:12:50 PDT 2021


nikic requested changes to this revision.
nikic added a comment.
This revision now requires changes to proceed.

As this fold is currently subsumed by the more general inttoptr(ptrtoint(x)) fold, your test isn't really testing anything useful right now. Even without your added code, it folds to the same result.

I think you should add an option that disables the primary fold, and then use that option in the test. That way you can show that this particular case is still handled even once the general fold has been removed.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D105088/new/

https://reviews.llvm.org/D105088



More information about the llvm-commits mailing list