[PATCH] D69396: [IR] Use UnaryOperator::CreateFNeg in NoFolder::createFNeg
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 24 10:45:05 PDT 2019
craig.topper created this revision.
craig.topper added a reviewer: cameron.mcinally.
Herald added a project: LLVM.
If IRBuilder is constructed using the NoFolder constant folder, we should use the Unary FNeg to match the non-constant part of IRBuilder.
https://reviews.llvm.org/D69396
Files:
llvm/include/llvm/IR/NoFolder.h
Index: llvm/include/llvm/IR/NoFolder.h
===================================================================
--- llvm/include/llvm/IR/NoFolder.h
+++ llvm/include/llvm/IR/NoFolder.h
@@ -196,7 +196,7 @@
}
Instruction *CreateFNeg(Constant *C) const {
- return BinaryOperator::CreateFNeg(C);
+ return UnaryOperator::CreateFNeg(C);
}
Instruction *CreateNot(Constant *C) const {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69396.226295.patch
Type: text/x-patch
Size: 393 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191024/5fb7ded6/attachment.bin>
More information about the llvm-commits
mailing list