Skip to content
Commit 84793892 authored by Roman Lebedev's avatar Roman Lebedev
Browse files

[NFC][InstSimplify] Add tests for shl nuw C, %x -> C fold.

%r = shl nuw i8 C, %x

As per langref: If the nuw keyword is present, then the shift produces
                a poison value if it shifts out any non-zero bits.
Thus, if the sign bit is set on C, then %x can only be 0,
which means that %r can only be C.

https://rise4fun.com/Alive/WMk
Was mentioned in D47428 review.

llvm-svn: 334200
parent 898fbd7c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment