[PATCH] D121504: [DAGCombine] add tests for bswap-shift optimization

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 28 05:14:25 PDT 2022


RKSimon added inline comments.


================
Comment at: llvm/test/CodeGen/X86/combine-bswap.ll:42
+; TODO: fold (bswap(srl (bswap c), x)) -> (shl c, x)
+define i32 @test_bswap_srli_8_bswap_i32(i32 %a) nounwind {
+; X86-LABEL: test_bswap_srli_8_bswap_i32:
----------------
Please can you add one i16 + i64 test case each as well? i16 as it lowers to a rotate and i64 so we can check its correctly handled on 32-bit targets


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D121504/new/

https://reviews.llvm.org/D121504



More information about the llvm-commits mailing list