[all-commits] [llvm/llvm-project] 975727: Reland [DataLayout] Fix occurrences that size and ...

Nicola Zaghen via All-commits all-commits at lists.llvm.org
Fri Dec 13 06:32:47 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 97572775d2fe088d8059b3a9423f6d8539fafe33
      https://github.com/llvm/llvm-project/commit/97572775d2fe088d8059b3a9423f6d8539fafe33
  Author: Nicola Zaghen <nicola.zaghen at imgtec.com>
  Date:   2019-12-13 (Fri, 13 Dec 2019)

  Changed paths:
    M clang/lib/CodeGen/CGExprScalar.cpp
    M llvm/include/llvm/Analysis/PtrUseVisitor.h
    M llvm/include/llvm/Analysis/Utils/Local.h
    M llvm/lib/Analysis/ConstantFolding.cpp
    M llvm/lib/Analysis/InlineCost.cpp
    M llvm/lib/Analysis/InstructionSimplify.cpp
    M llvm/lib/Analysis/Loads.cpp
    M llvm/lib/Analysis/MemoryBuiltins.cpp
    M llvm/lib/Analysis/ScalarEvolution.cpp
    M llvm/lib/Analysis/ScalarEvolutionExpander.cpp
    M llvm/lib/Analysis/ValueTracking.cpp
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
    M llvm/lib/IR/DataLayout.cpp
    M llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
    M llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
    M llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
    M llvm/lib/Transforms/Utils/Local.cpp
    A llvm/test/Transforms/InstCombine/builtin-object-size-custom-dl.ll
    M llvm/test/Transforms/InstCombine/gep-custom-dl.ll
    M llvm/test/Transforms/InstCombine/icmp-custom-dl.ll
    A llvm/test/Transforms/InstCombine/stdio-custom-dl.ll
    M llvm/test/Transforms/PhaseOrdering/scev-custom-dl.ll
    M llvm/test/Transforms/SimplifyCFG/switch_create-custom-dl.ll

  Log Message:
  -----------
  Reland [DataLayout] Fix occurrences that size and range of pointers are assumed to be the same.

GEP index size can be specified in the DataLayout, introduced in D42123. However, there were still places
in which getIndexSizeInBits was used interchangeably with getPointerSizeInBits. This notably caused issues
with Instcombine's visitPtrToInt; but the unit tests was incorrect, so this remained undiscovered.

This fixes the buildbot failures.

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

Patch by Joseph Faulls!




More information about the All-commits mailing list