[NFC][CodeGen][X86][AArch64] Tests for bit extract (pat. b) with trunc (PR36419)
authorRoman Lebedev <lebedev.ri@gmail.com>
Sat, 22 Dec 2018 09:40:14 +0000 (09:40 +0000)
committerRoman Lebedev <lebedev.ri@gmail.com>
Sat, 22 Dec 2018 09:40:14 +0000 (09:40 +0000)
commit29d8af283a762a07f6b15ad59b5cfa507bc42620
treec459b1108f075accce17f4512b1f5e42ef8f5793
parent9efb0153f057008e828f393609ad8477c848316b
[NFC][CodeGen][X86][AArch64] Tests for bit extract (pat. b) with trunc (PR36419)

@bextr64_32_b1 is extracted from hotpath of real-world code
(RawSpeed BitStream<>::peekBitsNoFill()) after `clang -O3`.

@bextr64_32_b2/@bextr64_32_b0 is the same pattern,
but with trunc done last, showing how i think it can be handled:
https://rise4fun.com/Alive/K4B
https://rise4fun.com/Alive/qC9

It is possible that middle-end should do some of this, too.

https://bugs.llvm.org/show_bug.cgi?id=36419

llvm-svn: 349998
llvm/test/CodeGen/AArch64/extract-bits.ll
llvm/test/CodeGen/X86/extract-bits.ll