[InstCombine] Use replaceOperand() in demanded elements simplification
authorNikita Popov <nikita.ppv@gmail.com>
Sun, 29 Mar 2020 18:07:46 +0000 (20:07 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Sun, 29 Mar 2020 18:43:19 +0000 (20:43 +0200)
commit53d209076aa877e4e40edaaf3614f33285e1851b
treec872bded26c57baf8c63a8c1a60c16f7768fdce8
parent4e4ea2cde44db699e6111caee4a1a71ae8d0b9d6
[InstCombine] Use replaceOperand() in demanded elements simplification

To make sure that dead operands get DCEd. This fixes the largest
source of leftover dead operands we see in tests.

NFC apart from worklist changes.
llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp