[all-commits] [llvm/llvm-project] a082c7: [WebAssembly] Fix FastISel address calculation bug

Thomas Lively via All-commits all-commits at lists.llvm.org
Tue Dec 1 13:33:05 PST 2020


  Branch: refs/heads/release/11.x
  Home:   https://github.com/llvm/llvm-project
  Commit: a082c730b89fe5e544136ebe6370f452fd2772ee
      https://github.com/llvm/llvm-project/commit/a082c730b89fe5e544136ebe6370f452fd2772ee
  Author: Thomas Lively <tlively at google.com>
  Date:   2020-12-01 (Tue, 01 Dec 2020)

  Changed paths:
    M llvm/lib/Target/WebAssembly/WebAssemblyFastISel.cpp
    A llvm/test/CodeGen/WebAssembly/fast-isel-pr47040.ll

  Log Message:
  -----------
  [WebAssembly] Fix FastISel address calculation bug

Fixes PR47040, in which an assertion was improperly triggered during
FastISel's address computation. The issue was that an `Address` set to
be relative to the FrameIndex with offset zero was incorrectly
considered to have an unset base. When the left hand side of an add
set the Address to be 0 off the FrameIndex, the right side would not
detect that the Address base had already been set and could try to set
the Address to be relative to a register instead, triggering an
assertion.

This patch fixes the issue by explicitly tracking whether an `Address`
has been set rather than interpreting an offset of zero to mean the
`Address` has not been set.

Differential Revision: https://reviews.llvm.org/D85581

(cherry picked from commit cc612c29084e907900ce63ad9031ab573a64e942)




More information about the All-commits mailing list