[PATCH] D147348: [MergedLoadStoreMotion] Merge stores with conflicting value types

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 31 12:25:15 PDT 2023


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

Please add tests for a) one store being `ptr` and the other `i64` and b) one store being `i64` and the other `{ i32, i32 }`. The former requires the insertion of inttoptr or ptrtoint casts, the latter is not bitcastable. The correct predicate to use here is `CastInst::isBitOrNoopPointerCastable()` and then `IRBuilder::CreateBitOrPointerCast()` to materialize the cast.

It's probably simpler and cleaner to explicitly check this than trying to integrate checks into isSameOperationAs() in a way that makes sense.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D147348



More information about the llvm-commits mailing list