aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2021-10-23 22:50:24 +0200
committerNikita Popov <nikita.ppv@gmail.com>2021-11-07 18:56:11 +0100
commita8c318b50eccc922bc76f22e1791b0420574187d (patch)
treec2d6c1ed8bcf502fed4a02765565ca474e2fb697 /llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp
parentaee86f9b6cbb262a83f9f31371b047eb5bcd0a2b (diff)
downloadllvm-a8c318b50eccc922bc76f22e1791b0420574187d.zip
llvm-a8c318b50eccc922bc76f22e1791b0420574187d.tar.gz
llvm-a8c318b50eccc922bc76f22e1791b0420574187d.tar.bz2
[BasicAA] Use index size instead of pointer size
When accumulating the GEP offset in BasicAA, we should use the pointer index size rather than the pointer size. Differential Revision: https://reviews.llvm.org/D112370
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp')
-rw-r--r--llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp
index 3851300..0d3f516 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp
@@ -506,7 +506,7 @@ void WebAssemblyAsmPrinter::EmitTargetFeatures(Module &M) {
// This is an "architecture", not a "feature", but we emit it as such for
// the benefit of tools like Binaryen and consistency with other producers.
// FIXME: Subtarget is null here, so can't Subtarget->hasAddr64() ?
- if (M.getDataLayout().getMaxPointerSize() == 8) {
+ if (M.getDataLayout().getPointerSize() == 8) {
// Can't use EmitFeature since "wasm-feature-memory64" is not a module
// flag.
EmittedFeatures.push_back({wasm::WASM_FEATURE_PREFIX_USED, "memory64"});