[PATCH] D29284: [AMDGPU] Lower null pointers in static variable initializer

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 1 09:26:18 PST 2017

arsenm added inline comments.

Comment at: lib/Target/AMDGPU/Utils/AMDGPUConstantFoldUtils.cpp:17
+bool isNonZeroNullPointer(const Constant *CV) {
+  auto CE = dyn_cast<ConstantExpr>(CV);
This doesn't need to be its own file and isn't the right API to be re-used. I think the right place is in AMDGPUTargetMachine because this is logically part of the DataLayout.

The base function should just be the address spaces so it can be used in the DAG and MI


More information about the llvm-commits mailing list