From 1877ac993757e7e7290b9b1e9f3a0f11dd2f5c28 Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Thu, 9 Jun 2011 22:14:44 +0000 Subject: Change this DAGCombine to build AND of SHR instead of SHR of AND; this matches the ordering we prefer in instcombine. Part of rdar://9562809. The potential DAGCombine which enforces this more generally messes up some other very fragile patterns, so I'm leaving that alone, at least for now. llvm-svn: 132809 --- llvm/test/CodeGen/X86/shift-pair.ll | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 llvm/test/CodeGen/X86/shift-pair.ll (limited to 'llvm/test/CodeGen/X86/shift-pair.ll') diff --git a/llvm/test/CodeGen/X86/shift-pair.ll b/llvm/test/CodeGen/X86/shift-pair.ll new file mode 100644 index 00000000000..24ba1fc7707 --- /dev/null +++ b/llvm/test/CodeGen/X86/shift-pair.ll @@ -0,0 +1,11 @@ +; RUN: llc < %s -march=x86-64 | FileCheck %s + +define i64 @test(i64 %A) { +; CHECK: @test +; CHECK: shrq $54 +; CHECK: andq $1020 +; CHECK: ret + %B = lshr i64 %A, 56 + %C = shl i64 %B, 2 + ret i64 %C +} -- cgit v1.2.3