diff options
author | Guillaume Chatelet <gchatelet@google.com> | 2020-03-18 10:50:38 +0100 |
---|---|---|
committer | Guillaume Chatelet <gchatelet@google.com> | 2020-03-18 14:48:45 +0100 |
commit | d000655a8cd58c8449a86a1761038c8c1dd78d87 (patch) | |
tree | 71bba160f4ac5302dbe1d87022a61e3d40eb4984 /llvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp | |
parent | 96b70809d9599facdb5c40396330f11211874b45 (diff) | |
download | llvm-d000655a8cd58c8449a86a1761038c8c1dd78d87.zip llvm-d000655a8cd58c8449a86a1761038c8c1dd78d87.tar.gz llvm-d000655a8cd58c8449a86a1761038c8c1dd78d87.tar.bz2 |
[Alignment][NFC] Deprecate getMaxAlignment
Summary:
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790
Reviewers: courbet
Subscribers: jholewinski, arsenm, dschuff, jyknight, sdardis, nemanjai, jvesely, nhaehnle, sbc100, jgravelle-google, hiraditya, aheejin, kbarton, fedor.sergeev, asb, rbar, johnrusso, simoncook, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, atanasyan, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, Jim, lenary, s.egerton, pzheng, sameer.abuasal, apazos, luismarques, kerbowa, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D76348
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp')
-rw-r--r-- | llvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp index 21b81d8..036c2ae 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp +++ b/llvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp @@ -201,11 +201,9 @@ void WebAssemblyFrameLowering::emitPrologue(MachineFunction &MF, } if (HasBP) { Register BitmaskReg = MRI.createVirtualRegister(PtrRC); - unsigned Alignment = MFI.getMaxAlignment(); - assert((1u << countTrailingZeros(Alignment)) == Alignment && - "Alignment must be a power of 2"); + Align Alignment = MFI.getMaxAlign(); BuildMI(MBB, InsertPt, DL, TII->get(WebAssembly::CONST_I32), BitmaskReg) - .addImm((int)~(Alignment - 1)); + .addImm((int)~(Alignment.value() - 1)); BuildMI(MBB, InsertPt, DL, TII->get(WebAssembly::AND_I32), WebAssembly::SP32) .addReg(WebAssembly::SP32) |