diff options
| author | bors <bors@rust-lang.org> | 2014-06-22 00:01:34 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-06-22 00:01:34 +0000 |
| commit | 4c39962d325c09849e9cbb1828f85028f29fcea3 (patch) | |
| tree | 00465a2053409f3dee73d6daaf16e586cdd5fd46 /src/test/compile-fail/struct-no-fields-enumlike.rs | |
| parent | db9af1d505809c965e719bf4ad775ff984ee3da6 (diff) | |
| parent | d747de5a927e405c7d12ae04d213bdc05add2032 (diff) | |
| download | rust-4c39962d325c09849e9cbb1828f85028f29fcea3.tar.gz rust-4c39962d325c09849e9cbb1828f85028f29fcea3.zip | |
auto merge of #15005 : dotdash/rust/i1_bool, r=alexcrichton
We currently compiled bools to i8 values, because there was a bug in LLVM that sometimes caused miscompilations when using i1 in, for example, structs. Using i8 means a lot of unnecessary zero-extend and truncate operations though, since we have to convert the value from and to i1 when using for example icmp or br instructions. Besides the unnecessary overhead caused by this, it also sometimes made LLVM miss some optimizations. First, we have to fix some bugs concerning the handling of attributes in foreign function declarations and calls. These are required because the i1 type needs the ZExt attribute when used as a function parameter or return type. Then we have to update LLVM to get a bugfix without which LLVM sometimes generates broken code when using i1. And then, finally, we can switch bools over to i1.
Diffstat (limited to 'src/test/compile-fail/struct-no-fields-enumlike.rs')
0 files changed, 0 insertions, 0 deletions
