Q:

Is there a case where '&' yields a lower performance than '%'?

The following two code sequences produce the same result:
uint mod = val % 4;

uint mod1 = val & 0x3;

I can use both to calculate the same result. I know that in hardware the & operator is much more simpler realised than the % operator. Therefore I expect it to have a better performance than the % operator.
Can I always assume that the & has a better or equal performance?
Does a compiler optimize this automatically?

A:

You can't assume anything about either of these operations, a compile could optimise both to the same instructions.
And, indeed, both clang and gcc will translate them into a single and instruction.
Unfortunately, due to the nature of % having a specified return value for negative values since ISO C99, some extra work is required for signed integers. As opposed to ISO C90, where negative modulo was implementation defined.
The resulting assembly for both operations, on either signed and unsigned values:
modulo with signed integers:
mov     eax, DWORD PTR [esp+4]       ; grab `val`
cdq                                  ; convert 32-bit EAX to 64-bit
                                     ; and fill EDX with the sign bit
shr     edx, 30                      ; shift EDX by 30 positions to the right
                                     ; leaving only the two left-most bits
add     eax, edx                     ; add EDX to EAX
and     eax, 3                       ; do the AND
sub     eax, edx                     ; subtract EDX from EAX
mov     DWORD PTR [esp+8], eax       ; move result on stack

This is neat trick, to have properly defined behaviour for negative values. It's doing ((val + 3) & 3) - 3 for negative values, and val & 3 for positive.
and with signed/unsigned and modulo with unsigned:
mov     eax, DWORD PTR [esp+4]
and     eax, 3
mov     DWORD PTR [esp+12], eax

