[llvm] [X86] Merge BT with a matching BTR/BTS/BTC (PR #193612)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Sun May 10 03:59:28 PDT 2026


=?utf-8?q?Pawe=C5=82?= Bylica <pawel at hepcolgum.band>,
=?utf-8?q?Pawe=C5=82?= Bylica <pawel at hepcolgum.band>,
=?utf-8?q?Pawe=C5=82?= Bylica <pawel at hepcolgum.band>,
=?utf-8?q?Pawe=C5=82?= Bylica <pawel at hepcolgum.band>,
=?utf-8?q?Pawe=C5=82?= Bylica <pawel at hepcolgum.band>,
=?utf-8?q?Pawe=C5=82?= Bylica <pawel at hepcolgum.band>,
=?utf-8?q?Pawe=C5=82?= Bylica <pawel at hepcolgum.band>,
=?utf-8?q?Pawe=C5=82?= Bylica <pawel at hepcolgum.band>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/193612 at github.com>


================
@@ -0,0 +1,67 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc < %s -mtriple=x86_64-- | FileCheck %s
+
+; combineBT only fuses BT with BTR/BTS/BTC when the bit positions match
+; (modulo trunc/zext/any-ext/and-with-mask). When the bit positions differ,
+; both instructions must remain in the output.
+
+define i1 @no_fuse_diff_pos_xor(ptr %word, i32 %a, i32 %b) nounwind {
----------------
RKSimon wrote:

move these tests into bt-merge-fuse as negative tests?

https://github.com/llvm/llvm-project/pull/193612


More information about the llvm-commits mailing list