From 1bd53c367580c8c039c675bf9ac3a1406a8224e1 Mon Sep 17 00:00:00 2001 From: Andrew Trick Date: Fri, 8 Feb 2013 01:55:39 +0000 Subject: [PATCH] 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. llvm-svn: 174692 --- llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp | 6 ------ llvm/test/Transforms/InstCombine/intrinsics.ll | 16 ++-------------- 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp index cb9ba44..64cd1bd 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp @@ -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(CallInst &CI) { 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(&CI); if (!II) return visitCallSite(&CI); diff --git a/llvm/test/Transforms/InstCombine/intrinsics.ll b/llvm/test/Transforms/InstCombine/intrinsics.ll index 6bfea72..f334b3b 100644 --- a/llvm/test/Transforms/InstCombine/intrinsics.ll +++ b/llvm/test/Transforms/InstCombine/intrinsics.ll @@ -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) nounwind { ; 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 -- 2.7.4