Revert "[JumpThreading] Ignore free instructions"
authorHans Wennborg <hans@chromium.org>
Fri, 24 Sep 2021 14:14:53 +0000 (16:14 +0200)
committerHans Wennborg <hans@chromium.org>
Fri, 24 Sep 2021 14:14:53 +0000 (16:14 +0200)
commit4604695d7c20e72b551a1a5224f3de877cb41bd3
tree5a356c9d3fbd6419a0ba0d23f53879668e20b2bb
parentad890aa2327feb6b6aee676fe85b2352fba2403e
Revert "[JumpThreading] Ignore free instructions"

It caused compiler crashes, see comment on the code review for repro.

> This is basically D108837 but for jump threading. Free instructions
> should be ignored for the threading decision. JumpThreading already
> skips some free instructions (like pointer bitcasts), but does not
> skip various free intrinsics -- in fact, it currently gives them a
> fairly large cost of 2.
>
> Differential Revision: https://reviews.llvm.org/D110290

This reverts commit 1e3c6fc7cb9d2ee6a5328881f95d6643afeadbff.
llvm/include/llvm/Transforms/Scalar/JumpThreading.h
llvm/lib/Transforms/Scalar/JumpThreading.cpp
llvm/test/Transforms/JumpThreading/free_instructions.ll
llvm/test/Transforms/PhaseOrdering/inlining-alignment-assumptions.ll