diff options
| author | Jakub Staszak <jstaszak@apple.com> | 2011-07-06 23:50:16 +0000 |
|---|---|---|
| committer | Jakub Staszak <jstaszak@apple.com> | 2011-07-06 23:50:16 +0000 |
| commit | a11f7ecbf80dd746726336bb5df5b6b9be87191d (patch) | |
| tree | 9c6647eddb6ce8680a77fffca876b9517958443a /llvm | |
| parent | bf007364bf520a60a48c498472e2dbd76753cf08 (diff) | |
| download | bcm5719-llvm-a11f7ecbf80dd746726336bb5df5b6b9be87191d.tar.gz bcm5719-llvm-a11f7ecbf80dd746726336bb5df5b6b9be87191d.zip | |
Fix a bug in the "expect" intrinsic lowering.
llvm-svn: 134566
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/lib/Transforms/Utils/LowerExpectIntrinsic.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/LowerExpectIntrinsic.cpp b/llvm/lib/Transforms/Utils/LowerExpectIntrinsic.cpp index fd94c84413b..563f7f4490a 100644 --- a/llvm/lib/Transforms/Utils/LowerExpectIntrinsic.cpp +++ b/llvm/lib/Transforms/Utils/LowerExpectIntrinsic.cpp @@ -145,8 +145,11 @@ bool LowerExpectIntrinsic::runOnFunction(Function &F) { continue; Function *Fn = CI->getCalledFunction(); - if (Fn && Fn->getIntrinsicID() == Intrinsic::expect) + if (Fn && Fn->getIntrinsicID() == Intrinsic::expect) { + Value *Exp = CI->getArgOperand(0); + CI->replaceAllUsesWith(Exp); CI->eraseFromParent(); + } } } |

