[all-commits] [llvm/llvm-project] f30416: [AsmPrinter] Fix emission of non-standard integer ...

LemonBoy via All-commits all-commits at lists.llvm.org
Mon Apr 27 14:58:09 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: f30416fdde922eaa655934e050026930fefbd260
      https://github.com/llvm/llvm-project/commit/f30416fdde922eaa655934e050026930fefbd260
  Author: LemonBoy <thatlemon at gmail.com>
  Date:   2020-04-27 (Mon, 27 Apr 2020)

  Changed paths:
    M llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
    M llvm/test/CodeGen/ARM/emit-big-cst.ll
    M llvm/test/CodeGen/Mips/emit-big-cst.ll
    M llvm/test/CodeGen/PowerPC/aix-xcoff-mergeable-const.ll
    M llvm/test/CodeGen/X86/emit-big-cst.ll
    M llvm/test/CodeGen/X86/global-fill.ll

  Log Message:
  -----------
  [AsmPrinter] Fix emission of non-standard integer constants for BE targets

The code assumed that zero-extending the integer constant to the
designated alloc size would be fine even for BE targets, but that's not
the case as that pulls in zeros from the MSB side while we actually
expect the padding zeros to go after the LSB.

I've changed the codepath handling the constant integers to use the
store size for both small(er than u64) and big constants and then add
zero padding right after that.

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




More information about the All-commits mailing list