[all-commits] [llvm/llvm-project] 348ea3: [AsmPrinter] Further restrict expressions supporte...

Nikita Popov via All-commits all-commits at lists.llvm.org
Wed Jun 29 01:02:24 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 348ea34bcdbd4c62dd9b41cb05c7081f530f39cc
      https://github.com/llvm/llvm-project/commit/348ea34bcdbd4c62dd9b41cb05c7081f530f39cc
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2022-06-29 (Wed, 29 Jun 2022)

  Changed paths:
    M llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
    A llvm/test/CodeGen/X86/nonconst-static-div.ll
    M llvm/test/CodeGen/X86/ptrtoint-constexpr.ll

  Log Message:
  -----------
  [AsmPrinter] Further restrict expressions supported in global initializers

lowerConstant() currently accepts a number of constant expressions
which have corresponding MC expressions, but which cannot be
evaluated as a relocatable expression (unless the operands are
constant, in which case we'll just fold the expression to a constant).

The motivation here is to clarify which constant expressions are
really needed for https://discourse.llvm.org/t/rfc-remove-most-constant-expressions/63179,
and in particular clarify that we do not need to support any
division expressions, which are particularly problematic.

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




More information about the All-commits mailing list