[PATCH] D123573: [InferAddressSpaces] Check if AS are the same in isNoopPtrIntCastPair
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 12 06:07:42 PDT 2022
arsenm 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."));
----------------
If the only point of this flag is this one test, it's probably not worth it.
================
Comment at: llvm/lib/Transforms/Scalar/InferAddressSpaces.cpp:813-814
+ if (OverrideFlatAS != UninitializedAddressSpace)
+ FlatAddrSpace = OverrideFlatAS;
+
----------------
This override won't override the target callback
================
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.
----------------
"OpenCL" test subdirectory doesn't make sense. The subdirectories are for setting the target build requirements for the tests
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