<html>
<head>
<base href="https://llvm.org/bugs/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:echristo@gmail.com" title="Eric Christopher <echristo@gmail.com>"> <span class="fn">Eric Christopher</span></a>
</span> changed
<a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - LLVM 3.3 misses bitfield optimization"
href="https://llvm.org/bugs/show_bug.cgi?id=17955">bug 17955</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Status</td>
<td>NEW
</td>
<td>RESOLVED
</td>
</tr>
<tr>
<td style="text-align:right;">Resolution</td>
<td>---
</td>
<td>FIXED
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - LLVM 3.3 misses bitfield optimization"
href="https://llvm.org/bugs/show_bug.cgi?id=17955#c1">Comment # 1</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - LLVM 3.3 misses bitfield optimization"
href="https://llvm.org/bugs/show_bug.cgi?id=17955">bug 17955</a>
from <span class="vcard"><a class="email" href="mailto:echristo@gmail.com" title="Eric Christopher <echristo@gmail.com>"> <span class="fn">Eric Christopher</span></a>
</span></b>
<pre>We produce similar code (though not the same) to gcc here now:
dzur:~/tmp> cat > foo.c
struct foo {
int f_x : 1;
int f_y : 1;
};
int fun(struct foo *f) {
return f->f_x || f->f_y;
}
dzur:~/tmp> ~/builds/build-llvm/Debug+Asserts/bin/clang -O2 -S -o - foo.c
.text
.file "foo.c"
.globl fun
.align 16, 0x90
.type fun,@function
fun: # @fun
.cfi_startproc
# BB#0: # %entry
testb $3, (%rdi)
setne %al
movzbl %al, %eax
retq
.Lfunc_end0:
.size fun, .Lfunc_end0-fun
.cfi_endproc
.ident "clang version 3.8.0 (trunk 250477) (llvm/trunk 250464)"
.section ".note.GNU-stack","",@progbits
dzur:~/tmp> gcc -O2 -S -o - foo.c
.file "foo.c"
.text
.p2align 4,,15
.globl fun
.type fun, @function
fun:
.LFB0:
.cfi_startproc
xorl %eax, %eax
testb $3, (%rdi)
setne %al
ret
.cfi_endproc
.LFE0:
.size fun, .-fun
.ident "GCC: (Ubuntu 4.8.4-2ubuntu1~14.04) 4.8.4"
.section .note.GNU-stack,"",@progbits
Happy David?</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>