xref: /aosp_15_r20/external/llvm/test/CodeGen/X86/shift-coalesce.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=x86 -x86-asm-syntax=intel | \
2*9880d681SAndroid Build Coastguard Worker; RUN:   grep "shld.*cl"
3*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=x86 -x86-asm-syntax=intel | \
4*9880d681SAndroid Build Coastguard Worker; RUN:   not grep "mov cl, bl"
5*9880d681SAndroid Build Coastguard Worker
6*9880d681SAndroid Build Coastguard Worker; PR687
7*9880d681SAndroid Build Coastguard Worker
8*9880d681SAndroid Build Coastguard Workerdefine i64 @foo(i64 %x, i64* %X) {
9*9880d681SAndroid Build Coastguard Worker        %tmp.1 = load i64, i64* %X           ; <i64> [#uses=1]
10*9880d681SAndroid Build Coastguard Worker        %tmp.3 = trunc i64 %tmp.1 to i8         ; <i8> [#uses=1]
11*9880d681SAndroid Build Coastguard Worker        %shift.upgrd.1 = zext i8 %tmp.3 to i64          ; <i64> [#uses=1]
12*9880d681SAndroid Build Coastguard Worker        %tmp.4 = shl i64 %x, %shift.upgrd.1             ; <i64> [#uses=1]
13*9880d681SAndroid Build Coastguard Worker        ret i64 %tmp.4
14*9880d681SAndroid Build Coastguard Worker}
15*9880d681SAndroid Build Coastguard Worker
16