[llvm] [DAG] MatchLoadCombine - match swapped loads (PR #167416)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 11 03:52:29 PST 2025
================
@@ -0,0 +1,22 @@
+; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu | FileCheck %s
+
+; This test checks that a pattern of two 32-bit loads, which are combined
+; to form a 64-bit value with swapped words, is optimized into a single
+; 64-bit load followed by a 32-bit rotate.
+
+define i64 @test_load_bswap_to_rotate(ptr %p) {
----------------
RKSimon wrote:
no new test file - just add this to load-combine.ll
https://github.com/llvm/llvm-project/pull/167416
More information about the llvm-commits
mailing list