[DAG] Add SimplifyDemandedBits support for BSWAP
authorSanjay Patel <spatel@rotateright.com>
Sun, 15 Dec 2019 13:52:34 +0000 (08:52 -0500)
committerSanjay Patel <spatel@rotateright.com>
Sun, 15 Dec 2019 13:52:34 +0000 (08:52 -0500)
commit2afe86411847b3305915f536256b8bb877d8a356
treed31180d1d523d5e5f6071512d74cdb0109ca7e8b
parent273e67425243c74b33d24aa5b2c574877cc3e9bb
[DAG] Add SimplifyDemandedBits support for BSWAP

This exposes a shortcoming for AArch64, and that is tracked by PR40881:
https://bugs.llvm.org/show_bug.cgi?id=40881

Patch by: @RKSimon (Simon Pilgrim)

Differential Revision: https://reviews.llvm.org/D58017
llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
llvm/test/CodeGen/AArch64/arm64-rev.ll
llvm/test/CodeGen/AMDGPU/bswap.ll
llvm/test/CodeGen/X86/combine-bswap.ll