[all-commits] [llvm/llvm-project] 5f6208: [DataLayout] Fix occurrences that size and range o...

Nicola Zaghen via All-commits all-commits at lists.llvm.org
Thu Dec 12 02:10:26 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 5f6208778ff92567c57d7c1e2e740c284d7e69a5
      https://github.com/llvm/llvm-project/commit/5f6208778ff92567c57d7c1e2e740c284d7e69a5
  Author: Nicola Zaghen <nicola.zaghen at imgtec.com>
  Date:   2019-12-12 (Thu, 12 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:
  -----------
  [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.

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

Patch by Joseph Faulls!




More information about the All-commits mailing list