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-cc -triple i386-unknown-unknown -O0 -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-cc -triple i386-unknown-unknown -O3 -emit-llvm -o %t %s
13 // RUN: grep 'load ' %t | count 0
14 // RUN: grep "@g0" %t | count 0
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.