[all-commits] [llvm/llvm-project] 395607: Reapply [ConstantFold] Fold more operations to poison

Juneyoung Lee via All-commits all-commits at lists.llvm.org
Thu May 13 07:04:43 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 395607af3cb80f25ee05420ea5ae0ad0be948533
      https://github.com/llvm/llvm-project/commit/395607af3cb80f25ee05420ea5ae0ad0be948533
  Author: Juneyoung Lee <aqjune at gmail.com>
  Date:   2021-05-13 (Thu, 13 May 2021)

  Changed paths:
    M clang/test/Frontend/fixed_point_unary.c
    M llvm/lib/IR/ConstantFold.cpp
    M llvm/test/CodeGen/AMDGPU/amdgpu-codegenprepare-fold-binop-select.ll
    M llvm/test/Transforms/InstCombine/apint-shift.ll
    M llvm/test/Transforms/InstCombine/canonicalize-ashr-shl-to-masking.ll
    M llvm/test/Transforms/InstCombine/canonicalize-lshr-shl-to-masking.ll
    M llvm/test/Transforms/InstCombine/canonicalize-shl-lshr-to-masking.ll
    M llvm/test/Transforms/InstCombine/icmp.ll
    M llvm/test/Transforms/InstCombine/partally-redundant-left-shift-input-masking-after-truncation-variant-a.ll
    M llvm/test/Transforms/InstCombine/partally-redundant-left-shift-input-masking-after-truncation-variant-b.ll
    M llvm/test/Transforms/InstCombine/partally-redundant-left-shift-input-masking-after-truncation-variant-c.ll
    M llvm/test/Transforms/InstCombine/partally-redundant-left-shift-input-masking-after-truncation-variant-d.ll
    M llvm/test/Transforms/InstCombine/partally-redundant-left-shift-input-masking-after-truncation-variant-e.ll
    M llvm/test/Transforms/InstCombine/partally-redundant-left-shift-input-masking-variant-a.ll
    M llvm/test/Transforms/InstCombine/partally-redundant-left-shift-input-masking-variant-b.ll
    M llvm/test/Transforms/InstCombine/partally-redundant-left-shift-input-masking-variant-c.ll
    M llvm/test/Transforms/InstCombine/partally-redundant-left-shift-input-masking-variant-d.ll
    M llvm/test/Transforms/InstCombine/partally-redundant-left-shift-input-masking-variant-e.ll
    M llvm/test/Transforms/InstCombine/select-of-bittest.ll
    M llvm/test/Transforms/InstCombine/shift-add-inseltpoison.ll
    M llvm/test/Transforms/InstCombine/shift-add.ll
    M llvm/test/Transforms/InstSimplify/ConstProp/InsertElement-inseltpoison.ll
    M llvm/test/Transforms/InstSimplify/ConstProp/InsertElement.ll
    M llvm/test/Transforms/InstSimplify/ConstProp/cast.ll
    M llvm/test/Transforms/InstSimplify/ConstProp/poison.ll
    M llvm/test/Transforms/InstSimplify/ConstProp/shift.ll
    M llvm/test/Transforms/InstSimplify/ConstProp/vector-undef-elts-inseltpoison.ll
    M llvm/test/Transforms/InstSimplify/ConstProp/vector-undef-elts.ll
    M llvm/test/Transforms/InstSimplify/ConstProp/vscale-inseltpoison.ll
    M llvm/test/Transforms/InstSimplify/ConstProp/vscale.ll
    M llvm/test/Transforms/InstSimplify/div.ll
    M llvm/test/Transforms/InstSimplify/rem.ll
    M llvm/test/Transforms/InstSimplify/undef.ll
    M llvm/test/Transforms/SROA/phi-gep.ll
    M llvm/test/Transforms/SROA/select-gep.ll
    M llvm/test/Transforms/VectorCombine/X86/insert-binop-inseltpoison.ll
    M llvm/test/Transforms/VectorCombine/X86/insert-binop-with-constant.ll
    M llvm/test/Transforms/VectorCombine/X86/insert-binop.ll
    M llvm/unittests/IR/ConstantsTest.cpp

  Log Message:
  -----------
  Reapply [ConstantFold] Fold more operations to poison

This was reverted to mitigate mitigate miscompiles caused by
the logical and/or to bitwise and/or fold. Reapply it now that
the underlying issue has been fixed by D101191.

-----

This patch folds more operations to poison.

Alive2 proof: https://alive2.llvm.org/ce/z/mxcb9G (it does not contain tests about div/rem because they fold to poison when raising UB)

Reviewed By: nikic

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




More information about the All-commits mailing list