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

Thomas Lively via All-commits all-commits at lists.llvm.org
Sat Aug 8 15:23:28 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: cc612c29084e907900ce63ad9031ab573a64e942
      https://github.com/llvm/llvm-project/commit/cc612c29084e907900ce63ad9031ab573a64e942
  Author: Thomas Lively <tlively at google.com>
  Date:   2020-08-08 (Sat, 08 Aug 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




More information about the All-commits mailing list