SuccessChanges

Summary

  1. Revert "[ThinLTO][test] Add visibility related tests" (details)
  2. Revert "[LoopDeletion] Allows deletion of possibly infinite side-effect free loops" (details)
  3. [NFC] Added tests for PR48604 (details)
  4. [InstCombine] Transform (A + B) - (A | B) to A & B (PR48604) (details)
Commit be764065beb2436cf32ca62c9c6148453d6a5814 by sureyeaah
Revert "[ThinLTO][test] Add visibility related tests"

Both newly added tests fail in Release.

This reverts commit 52aa4e210744361a5ed6dc50fef78ed91706e508.

Reviewed By: SureYeaah

Differential Revision: https://reviews.llvm.org/D93957
The file was removedllvm/test/ThinLTO/X86/visibility-macho.ll
The file was removedllvm/test/ThinLTO/X86/visibility-elf.ll
Commit 8bee4d4e8f54b5f28b9117b552d3b2c655ff129b by sureyeaah
Revert "[LoopDeletion] Allows deletion of possibly infinite side-effect free loops"

Test clang/test/Misc/loop-opt-setup.c fails when executed in Release.

This reverts commit 6f1503d59854b331f1f970d39839619b0a26bbc7.

Reviewed By: SureYeaah

Differential Revision: https://reviews.llvm.org/D93956
The file was modifiedllvm/include/llvm/Transforms/Utils/LoopUtils.h
The file was modifiedllvm/lib/Transforms/Scalar/LoopDeletion.cpp
The file was modifiedclang/test/Misc/loop-opt-setup.c
The file was removedllvm/test/Transforms/LoopDeletion/mustprogress.ll
The file was modifiedllvm/lib/Transforms/Utils/LoopUtils.cpp
The file was modifiedllvm/test/Transforms/LoopDeletion/no-exit-blocks.ll
Commit 9b6493946307c321cacc5d1da53bbae5a1acda24 by Dávid Bolvanský
[NFC] Added tests for PR48604
The file was modifiedllvm/test/Transforms/InstCombine/and.ll
Commit 742ea77ca4c0ea10d8ccd160c7d7f4257d214ed0 by Dávid Bolvanský
[InstCombine] Transform (A + B) - (A | B) to A & B (PR48604)

define i32 @src(i32 %x, i32 %y) {
%0:
  %a = add i32 %x, %y
  %o = or i32 %x, %y
  %r = sub i32 %a, %o
  ret i32 %r
}
=>
define i32 @tgt(i32 %x, i32 %y) {
%0:
  %b = and i32 %x, %y
  ret i32 %b
}
Transformation seems to be correct!

https://alive2.llvm.org/ce/z/aQRh2j
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
The file was modifiedllvm/test/Transforms/InstCombine/and.ll