[InstCombine] Use IRBuilder in freeze pushing transform (PR55619)
authorNikita Popov <npopov@redhat.com>
Tue, 24 May 2022 13:48:28 +0000 (15:48 +0200)
committerNikita Popov <npopov@redhat.com>
Tue, 24 May 2022 13:48:28 +0000 (15:48 +0200)
commitb2a13d3e2ddb905a7340dae42a08b9fc985b1054
treeb566a68d017b39c3a357756255ce8e34954fefbc
parente7ddb4f6b4e0b580f7a6f2fdc654aff0a82cffa9
[InstCombine] Use IRBuilder in freeze pushing transform (PR55619)

Use IRBuilder so that the newly created freeze instructions
automatically gets inserted back into the IC worklist.

The changed worklist processing order leads to some cosmetic
differences in tests.

Fixes https://github.com/llvm/llvm-project/issues/55619.
llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
llvm/test/Transforms/InstCombine/freeze.ll
llvm/test/Transforms/PGOProfile/chr.ll
llvm/test/Transforms/PhaseOrdering/X86/vector-reductions-logical.ll