diff options
author | Vedant Kumar <vsk@apple.com> | 2017-02-25 02:59:47 +0000 |
---|---|---|
committer | Vedant Kumar <vsk@apple.com> | 2017-02-25 02:59:47 +0000 |
commit | 5d7919730ba90b590953f3dbbb4109521cbaa2da (patch) | |
tree | efc6d949865f9187bcd14d7599a8d7886ba3c378 /test/Profile | |
parent | 83740ef4fd7b2c18bcbca00af68875e2e97aab35 (diff) |
Revert "[profiling] Fix profile counter increment when emitting selects (PR32019)"
This reverts commit r296231. It causes an assertion failure on 32-bit
machines
clang: /export/users/atombot/llvm/clang-atom-d525-fedora-rel/llvm/lib/IR/Instructions.cpp:263: void llvm::CallInst::init(llvm::FunctionType*, llvm::Value*, llvm::ArrayRef<llvm::Value*>, llvm::ArrayRef<llvm::OperandBundleDefT<llvm::Value*> >, const llvm::Twine&): Assertion `(i >= FTy->getNumParams() || FTy->getParamType(i) == Args[i]->getType()) && "Calling a function with a bad signature!"' failed.
llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/export/users/atombot/llvm/clang-atom-d525-fedora-rel/stage1/./bin/clang+0x1c5fbfa)
llvm::sys::RunSignalHandlers() (/export/users/atombot/llvm/clang-atom-d525-fedora-rel/stage1/./bin/clang+0x1c5dc7e)
SignalHandler(int) (/export/users/atombot/llvm/clang-atom-d525-fedora-rel/stage1/./bin/clang+0x1c5dde2)
__restore_rt (/lib64/libpthread.so.0+0x3f1d00efa0)
__GI_raise /home/glibctest/rpmbuild/BUILD/glibc-2.17-c758a686/signal/../nptl/sysdeps/unix/sysv/linux/raise.c:56:0
__GI_abort /home/glibctest/rpmbuild/BUILD/glibc-2.17-c758a686/stdlib/abort.c:92:0
__assert_fail_base /home/glibctest/rpmbuild/BUILD/glibc-2.17-c758a686/assert/assert.c:92:0
(/lib64/libc.so.6+0x3f1c82e622)
llvm::CallInst::init(llvm::FunctionType*, llvm::Value*, llvm::ArrayRef<llvm::Value*>, llvm::ArrayRef<llvm::OperandBundleDefT<llvm::Value*> >, llvm::Twine const&) (/export/users/atombot/llvm/clang-atom-d525-fedora-rel/stage1/./bin/clang+0x1804e3a)
clang::CodeGen::CodeGenPGO::emitCounterIncrement(clang::CodeGen::CGBuilderTy&, clang::Stmt const*, llvm::Value*) (/export/users/atombot/llvm/clang-atom-d525-fedora-rel/stage1/./bin/clang+0x1ec7891)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@296234 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Profile')
-rw-r--r-- | test/Profile/c-ternary.c | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/test/Profile/c-ternary.c b/test/Profile/c-ternary.c deleted file mode 100644 index 09e8329235..0000000000 --- a/test/Profile/c-ternary.c +++ /dev/null @@ -1,15 +0,0 @@ -// RUN: %clang_cc1 -triple x86_64-apple-macosx10.11.0 -x c %s -o - -emit-llvm -fprofile-instrument=clang | FileCheck %s - -// PR32019: Clang can lower some ternary operator expressions to select -// instructions. Make sure we only increment the profile counter for the -// condition when the condition evaluates to true. -// CHECK-LABEL: define i32 @f1 -int f1(int x) { -// CHECK: [[TOBOOL:%.*]] = icmp ne i32 %1, 0 -// CHECK-NEXT: [[STEP:%.*]] = zext i1 [[TOBOOL]] to i64 -// CHECK-NEXT: [[COUNTER:%.*]] = load i64, i64* getelementptr inbounds ([2 x i64], [2 x i64]* @__profc_f1, i64 0, i64 1) -// CHECK-NEXT: add i64 [[COUNTER]], [[STEP]] -// CHECK: [[COND:%.*]] = select i1 [[TOBOOL]], i32 0, i32 1 - return x ? 0 : 1; -// CHECK: ret i32 [[COND]] -} |