[PATCH] D94813: [MergeICmps] Don't merge icmps derived from pointers with addressspaces

Valentin Churavy via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 28 04:10:32 PDT 2021


vchuravy added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/MergeICmps.cpp:148
   Value *const Addr = LoadI->getOperand(0);
+  if (Addr->getType()->getPointerAddressSpace() != 0) {
+    LLVM_DEBUG(dbgs() << "from non-zero AddressSpace\n");
----------------
arichardson wrote:
> In the CHERI-enabled targets (for Aarch64,RISC-V and MIPS) memcmp takes `addrspace(200)` arguments. Would it be possible to use the memcmp signature instead of a hardcoded AS0 check?
Possibly, could you send me a reproducer/test case? I couldn't find any example in the test suite for memcmp with different AS.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D94813



More information about the llvm-commits mailing list