[PATCH] D65908: Support unary FNeg in LICM
Phabricator via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 8 14:39:25 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL368350: [LICM] Support unary FNeg in LICM (authored by mcinally, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D65908?vs=214007&id=214238#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65908/new/
https://reviews.llvm.org/D65908
Files:
llvm/trunk/lib/Transforms/Scalar/LICM.cpp
llvm/trunk/test/Transforms/LICM/hoisting.ll
Index: llvm/trunk/test/Transforms/LICM/hoisting.ll
===================================================================
--- llvm/trunk/test/Transforms/LICM/hoisting.ll
+++ llvm/trunk/test/Transforms/LICM/hoisting.ll
@@ -127,9 +127,8 @@
}
; CHECK: define void @test6(float %f)
-; CHECK: call
; CHECK: fneg
-; CHECK: call
+; CHECK: br label %for.body
define void @test6(float %f) #2 {
entry:
br label %for.body
Index: llvm/trunk/lib/Transforms/Scalar/LICM.cpp
===================================================================
--- llvm/trunk/lib/Transforms/Scalar/LICM.cpp
+++ llvm/trunk/lib/Transforms/Scalar/LICM.cpp
@@ -1032,7 +1032,8 @@
bool isHoistableAndSinkableInst(Instruction &I) {
// Only these instructions are hoistable/sinkable.
return (isa<LoadInst>(I) || isa<StoreInst>(I) || isa<CallInst>(I) ||
- isa<FenceInst>(I) || isa<BinaryOperator>(I) || isa<CastInst>(I) ||
+ isa<FenceInst>(I) || isa<CastInst>(I) ||
+ isa<UnaryOperator>(I) || isa<BinaryOperator>(I) ||
isa<SelectInst>(I) || isa<GetElementPtrInst>(I) || isa<CmpInst>(I) ||
isa<InsertElementInst>(I) || isa<ExtractElementInst>(I) ||
isa<ShuffleVectorInst>(I) || isa<ExtractValueInst>(I) ||
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65908.214238.patch
Type: text/x-patch
Size: 1237 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190808/b564efd2/attachment.bin>
More information about the llvm-commits
mailing list