middle-end: Fix ifcvt predicate generation for masked function calls
[official-gcc.git] / gcc / testsuite / g++.dg / torture / pr77822.C
blob4dc428b63eee981bda04e1faa29bb97e3986dca9
1 // PR target/77822
2 // { dg-do compile }
4 using UINT8 = char;
5 using UINT32 = int;
6 using UINT64 = long;
7 class A
9   void m_fn1 ();
10   struct B
11   {
12     UINT32 m_multiplier;
13   };
14   UINT8 m_datawidth;
15   UINT8 m_subunits;
16   B m_subunit_infos[];
18 int a;
19 UINT64 b;
20 void
21 A::m_fn1 ()
23   int c = 32, d = m_datawidth / c;
24   for (int e = 0; e < d; e++)
25     {
26       UINT32 f = e * 32;
27       if (b >> f & 1)
28         m_subunit_infos[m_subunits].m_multiplier = a;
29     }