[Evaluator] Use ConstantFoldInstOperands()
authorNikita Popov <npopov@redhat.com>
Thu, 30 Jun 2022 08:44:08 +0000 (10:44 +0200)
committerNikita Popov <npopov@redhat.com>
Thu, 30 Jun 2022 09:10:17 +0000 (11:10 +0200)
commit41f0b6a78143776d673565cfa830849e3b468b8e
tree5254ed9bac0067dffc58adaee34a1c5b50a2f46b
parenta6d4b4138ffcffabfacef12d1d903a44882ec933
[Evaluator] Use ConstantFoldInstOperands()

For instructions that don't need any special handling, use
ConstantFoldInstOperands(), rather than re-implementing individual
cases.

This is probably not NFC because it can handle cases the previous
code missed (e.g. vector operations).
llvm/lib/Transforms/Utils/Evaluator.cpp