teak-llvm/clang/test/CodeGen/builtin-expect.c
Fariborz Jahanian 0ebca28f1d 2nd argument of __builtin_expect must be evaluated
if it hs side-effect to matchgcc's behaviour.
Addresses radar 8172109.

llvm-svn: 109467
2010-07-26 23:11:03 +00:00

12 lines
185 B
C

// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s
int x;
int y(void);
void foo();
void FUNC() {
// CHECK: [[call:%.*]] = call i32 @y
if (__builtin_expect (x, y()))
foo ();
}