[PATCH] D123573: [InferAddressSpaces] Check if AS are the same in isNoopPtrIntCastPair
Wenju He via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 12 21:10:28 PDT 2022
wenju added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/InferAddressSpaces.cpp:148-151
+static cl::opt<unsigned> OverrideFlatAS(
+ "override-flat-addr-space", cl::init(UninitializedAddressSpace),
+ cl::ReallyHidden,
+ cl::desc("Override flat address space. This is mainly for test purpose."));
----------------
arsenm wrote:
> If the only point of this flag is this one test, it's probably not worth it.
the issue is still reproducible using -assume-default-is-flat-addrspace flag, so I'll update
================
Comment at: llvm/lib/Transforms/Scalar/InferAddressSpaces.cpp:813-814
+ if (OverrideFlatAS != UninitializedAddressSpace)
+ FlatAddrSpace = OverrideFlatAS;
+
----------------
arsenm wrote:
> This override won't override the target callback
I see, thanks
================
Comment at: llvm/test/Transforms/InferAddressSpaces/OpenCL/noop-ptrint-pair.ll:2
+; RUN: opt -mtriple=x86_64-unknown-unknown -S -o - -infer-address-spaces -override-flat-addr-space=4 %s | FileCheck %s
+
+; Check that assert in X86TargetMachine::isNoopAddrSpaceCast is not triggered.
----------------
arsenm wrote:
> "OpenCL" test subdirectory doesn't make sense. The subdirectories are for setting the target build requirements for the tests
shall I put it in parent folder or X86 subfolder?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D123573/new/
https://reviews.llvm.org/D123573
More information about the llvm-commits
mailing list