[PATCH] D149782: [DAGCombiner] Add bswap(logic_op(bswap(x), y)) regression test case; NFC

Noah Goldstein via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 3 14:28:52 PDT 2023


goldstein.w.n added inline comments.


================
Comment at: llvm/test/CodeGen/X86/combine-bswap.ll:327
+  %1 = tail call i64 @llvm.bswap.i64(i64 %b)
+  %2 = and i64 %1, %a
+  %3 = tail call i64 @llvm.bswap.i64(i64 %2)
----------------
youre `*_rhs_*` still have the `bswap` on the lhs.


================
Comment at: llvm/test/CodeGen/X86/combine-bswap.ll:385
+}
+
 ; negative test
----------------
Can you do two things.

1) Add a negative test that is `(bswap (logic (bitreverse a), b))`
2) Make some of the tests use `bitreverse`. You don't need to add new tests, just modify half the `bswap` ones to use `bitreverse instead.


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

https://reviews.llvm.org/D149782



More information about the llvm-commits mailing list