[PATCH] D156633: [InstSimplify] Add some basic simplifications for `llvm.ptrmask`

Noah Goldstein via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 1 00:47:20 PDT 2023


goldstein.w.n added inline comments.


================
Comment at: llvm/test/Transforms/InstSimplify/ptrmask.ll:28
 ; CHECK-SAME: (ptr [[P:%.*]]) {
-; CHECK-NEXT:    [[R:%.*]] = call ptr @llvm.ptrmask.p0.i64(ptr [[P]], i64 0)
-; CHECK-NEXT:    ret ptr [[R]]
+; CHECK-NEXT:    ret ptr null
 ;
----------------
nikic wrote:
> I don't think this fold is correct, but alive2 accepts it. I've filed https://github.com/AliveToolkit/alive2/issues/929.
Oh, in that case a lot of this series is out the window.
Would have thought ptr -> null would be okay, but clearly need to read up on provenance.

No need to review the rest of the series as this was assumed in A LOT of places, will refactor.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D156633



More information about the llvm-commits mailing list