[llvm] r174692 - Revert "Have InstCombine call SipmlifyCall when handling calls. Test case included."

Matt Beaumont-Gay matthewbg at google.com
Thu Feb 7 18:21:42 PST 2013


Thanks, I was just about to respond to the commit -- I believe it's
also responsible for Clang inflooping while compiling OpenSSL.

On Thu, Feb 7, 2013 at 5:55 PM, Andrew Trick <atrick at apple.com> wrote:
> Author: atrick
> Date: Thu Feb  7 19:55:39 2013
> New Revision: 174692
>
> URL: http://llvm.org/viewvc/llvm-project?rev=174692&view=rev
> Log:
> Revert "Have InstCombine call SipmlifyCall when handling calls. Test case included."
>
> This reverts commit 3854a5d90fee52af1065edbed34521fff6cdc18d.
>
> This causes a clang unit test to hang: vtable-available-externally.cpp.
>
> Modified:
>     llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp
>     llvm/trunk/test/Transforms/InstCombine/intrinsics.ll
>
> Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp?rev=174692&r1=174691&r2=174692&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp (original)
> +++ llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp Thu Feb  7 19:55:39 2013
> @@ -13,7 +13,6 @@
>
>  #include "InstCombine.h"
>  #include "llvm/ADT/Statistic.h"
> -#include "llvm/Analysis/InstructionSimplify.h"
>  #include "llvm/Analysis/MemoryBuiltins.h"
>  #include "llvm/IR/DataLayout.h"
>  #include "llvm/Support/CallSite.h"
> @@ -211,11 +210,6 @@ Instruction *InstCombiner::visitCallInst
>      return &CI;
>    }
>
> -  CallSite CS(&CI);
> -  if (Value *V = SimplifyCall(CS.getCalledValue(), CS.arg_begin(), CS.arg_end(),
> -                              TD))
> -    return ReplaceInstUsesWith(CI, V);
> -
>    IntrinsicInst *II = dyn_cast<IntrinsicInst>(&CI);
>    if (!II) return visitCallSite(&CI);
>
>
> Modified: llvm/trunk/test/Transforms/InstCombine/intrinsics.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/intrinsics.ll?rev=174692&r1=174691&r2=174692&view=diff
> ==============================================================================
> --- llvm/trunk/test/Transforms/InstCombine/intrinsics.ll (original)
> +++ llvm/trunk/test/Transforms/InstCombine/intrinsics.ll Thu Feb  7 19:55:39 2013
> @@ -152,8 +152,8 @@ entry:
>    ret void
>  ; CHECK: @powi
>  ; CHECK: %A = fdiv double 1.0{{.*}}, %V
> -; CHECK: store volatile double %A,
> -; CHECK: store volatile double 1.0
> +; CHECK: store volatile double %A,
> +; CHECK: store volatile double 1.0
>  ; CHECK: store volatile double %V
>  }
>
> @@ -256,15 +256,3 @@ define i32 @cttz_select(i32 %Value) noun
>  ; CHECK: @cttz_select
>  ; CHECK: select i1 %tobool, i32 %cttz, i32 32
>  }
> -
> -; Test that SimplifyCall is getting invoked by InstCombine
> -declare float @llvm.fabs.f32(float) nounwind readnone
> -define float @simplify_idempotent(float %a) {
> -; CHECK: @simplify_idempotent
> -; CHECK: fabs
> -; CHECK-NOT: fabs
> -  %a0 = call float @llvm.fabs.f32(float %a)
> -  %a1 = call float @llvm.fabs.f32(float %a0)
> -
> -  ret float %a1
> -}
> \ No newline at end of file
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits



More information about the llvm-commits mailing list