From 130fcde3e5541a64bcfbf35e2f8a6630a02645ed Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Wed, 9 Jan 2013 18:12:03 +0000 Subject: LICM: Hoist insertvalue/extractvalue out of loops. Fixes PR14854. llvm-svn: 171984 --- llvm/lib/Transforms/Scalar/LICM.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'llvm/lib/Transforms') diff --git a/llvm/lib/Transforms/Scalar/LICM.cpp b/llvm/lib/Transforms/Scalar/LICM.cpp index dc6bef71d1d..f94cd2a073e 100644 --- a/llvm/lib/Transforms/Scalar/LICM.cpp +++ b/llvm/lib/Transforms/Scalar/LICM.cpp @@ -440,13 +440,12 @@ bool LICM::canSinkOrHoistInst(Instruction &I) { } // Only these instructions are hoistable/sinkable. - bool HoistableKind = (isa(I) || isa(I) || - isa(I) || isa(I) || - isa(I) || isa(I) || - isa(I) || - isa(I)); - if (!HoistableKind) - return false; + if (!isa(I) && !isa(I) && !isa(I) && + !isa(I) && !isa(I) && + !isa(I) && !isa(I) && + !isa(I) && !isa(I) && + !isa(I)) + return false; return isSafeToExecuteUnconditionally(I); } -- cgit v1.2.3