repo.or.cz
/
llvm-project.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Revert "[llvm] Improve llvm.objectsize computation by computing GEP, alloca and mallo...
[llvm-project.git]
/
clang
/
test
/
CodeGen
/
PR2001-bitfield-reload.c
blob
9795a1be54e23010ec4ad60c8e049aed1515ef86
1
// RUN: %clang_cc1 -triple i386-unknown-unknown -O3 -emit-llvm -o - %s | FileCheck %s
2
// PR2001
3
4
/* Test that the result of the assignment properly uses the value *in
5
the bitfield* as opposed to the RHS. */
6
static int
foo
(
int
i
) {
7
struct
{
8
int
f0
:
2
;
9
}
x
;
10
return
(
x
.
f0
=
i
);
11
}
12
13
int
bar
(
void
) {
14
// CHECK: ret i32 1
15
return
foo
(-
5
) == -
1
;
16
}