[llvm] SimplifyLibCalls: Use the correct address space when computing integer widths. (PR #118586)
Owen Anderson via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 4 16:32:54 PST 2024
================
@@ -3357,7 +3362,9 @@ Value *LibCallSimplifier::optimizePrintFString(CallInst *CI, IRBuilderBase &B) {
// Create a string literal with no \n on it. We expect the constant merge
// pass to be run after this pass, to merge duplicate strings.
FormatStr = FormatStr.drop_back();
- Value *GV = B.CreateGlobalString(FormatStr, "str");
+ Value *GV = B.CreateGlobalString(
+ FormatStr, "str",
+ CI->getArgOperand(0)->getType()->getPointerAddressSpace());
----------------
resistor wrote:
Alright, let's just use the default globals address space. I'm going to split this component into a separate PR.
https://github.com/llvm/llvm-project/pull/118586
More information about the llvm-commits
mailing list