[all-commits] [llvm/llvm-project] 1f35d7: [ConstantFold] Get rid of special cases for sizeof...

Eli Friedman via All-commits all-commits at lists.llvm.org
Wed Aug 4 21:26:01 PDT 2021


  Branch: refs/heads/release/13.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 1f35d7c48278c71f9f8554c7962b04a3affcfd33
      https://github.com/llvm/llvm-project/commit/1f35d7c48278c71f9f8554c7962b04a3affcfd33
  Author: Eli Friedman <efriedma at quicinc.com>
  Date:   2021-08-04 (Wed, 04 Aug 2021)

  Changed paths:
    M clang/test/CodeGen/catch-nullptr-and-nonzero-offset-in-offsetof-idiom.c
    M clang/test/CodeGen/catch-nullptr-and-nonzero-offset.c
    M clang/test/CodeGenCXX/catch-nullptr-and-nonzero-offset-in-offsetof-idiom.cpp
    M clang/test/OpenMP/for_reduction_codegen.cpp
    M clang/test/OpenMP/master_taskloop_reduction_codegen.cpp
    M clang/test/OpenMP/master_taskloop_simd_reduction_codegen.cpp
    M clang/test/OpenMP/parallel_master_taskloop_reduction_codegen.cpp
    M clang/test/OpenMP/parallel_master_taskloop_simd_reduction_codegen.cpp
    M clang/test/OpenMP/taskloop_reduction_codegen.cpp
    M clang/test/OpenMP/taskloop_simd_reduction_codegen.cpp
    M llvm/lib/IR/ConstantFold.cpp
    M llvm/test/Other/constant-fold-gep.ll
    M llvm/test/Transforms/LowerTypeTests/function-disjoint.ll
    M llvm/test/tools/llvm-as/slow-ptrtoint.ll

  Log Message:
  -----------
  [ConstantFold] Get rid of special cases for sizeof etc.

Target-dependent constant folding will fold these down to simple
constants (or at least, expressions that don't involve a GEP).  We don't
need heroics to try to optimize the form of the expression before that
happens.

Fixes https://bugs.llvm.org/show_bug.cgi?id=51232 .

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

(cherry picked from commit 2a2847823f0d13188c43ebdd0baf42a95df750c7)


  Commit: 0661286a55fb7ef978bd5193fe140191cf7ac445
      https://github.com/llvm/llvm-project/commit/0661286a55fb7ef978bd5193fe140191cf7ac445
  Author: Eli Friedman <efriedma at quicinc.com>
  Date:   2021-08-04 (Wed, 04 Aug 2021)

  Changed paths:
    M clang/test/CodeGen/catch-nullptr-and-nonzero-offset.c
    M mlir/test/Target/LLVMIR/openacc-llvm.mlir

  Log Message:
  -----------
  Fix a couple regression tests I missed updating in 2a284782

(cherry picked from commit 6eb2ffbaeb56c8b08ad17c823e1699b964e10b8b)


Compare: https://github.com/llvm/llvm-project/compare/93da37dc58e9...0661286a55fb


More information about the All-commits mailing list