[InstCombine] Fold freeze(undef) into a proper constant
authorJuneyoung Lee <aqjune@gmail.com>
Thu, 30 Jul 2020 14:15:26 +0000 (23:15 +0900)
committerJuneyoung Lee <aqjune@gmail.com>
Thu, 6 Aug 2020 09:40:04 +0000 (18:40 +0900)
commitc771087161f4948a4d56d64e433f6bbc9dbfad90
tree85a48122ae5a9f5eb172a54ee92562d873bef058
parent54a1097b8373ea609babb3cac5ba5708c9b26150
[InstCombine] Fold freeze(undef) into a proper constant

This is a simple patch that folds freeze(undef) into a proper constant after inspecting its uses.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D84948
llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
llvm/test/Transforms/InstCombine/freeze-phi.ll
llvm/test/Transforms/InstCombine/freeze.ll
llvm/test/Transforms/InstCombine/select.ll