1 /* Check that the result of a bitfield assignment is properly
2 truncated and does not generate a redundant load. */
4 /* Check that we get one load for each simple assign and two for the
5 compound assign (load the old value before the add then load again
6 to store back). Also check that our g0 pattern is good. */
7 // RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm -o %t %s
8 // RUN: grep 'load ' %t | count 5
9 // RUN: grep "@g0" %t | count 4
11 // Check that we got the right value.
12 // RUN: %clang_cc1 -triple i386-unknown-unknown -O3 -emit-llvm -o %t %s
13 // RUN: not grep 'load ' %t
14 // RUN: not grep "@g0" %t
26 if ((s
.f0
= 3) != -1) g0();
31 if ((s
.f1
= 3) != 1) g0();
36 if ((s
.f2
= 3) != 3) g0();
41 // Just check this one for load counts.