[IRBuilder] Move CreateNeg() to fold API
authorNikita Popov <npopov@redhat.com>
Fri, 1 Jul 2022 12:54:10 +0000 (14:54 +0200)
committerNikita Popov <npopov@redhat.com>
Fri, 1 Jul 2022 12:54:10 +0000 (14:54 +0200)
commit21933b2f7f02cbbf67703d50da660ffc8119f84a
tree3b48c4f4e1830bffbad97483aa7e65ed7ec21a45
parent5c8021777c3a2bc2c4a97e8913929a6ca969db95
[IRBuilder] Move CreateNeg() to fold API

Remove the CreateNeg() method from IRBuilderFolder and base it on
CreateSub(0, V) instead, which will call FoldNoWrapBinaryOp().

May not be NFC if InstSimplifyFolder is used.
llvm/include/llvm/Analysis/InstSimplifyFolder.h
llvm/include/llvm/Analysis/TargetFolder.h
llvm/include/llvm/IR/ConstantFolder.h
llvm/include/llvm/IR/IRBuilder.h
llvm/include/llvm/IR/IRBuilderFolder.h
llvm/include/llvm/IR/NoFolder.h