xref: /llvm-project/llvm/test/CodeGen/X86/shift-one.ll (revision 2f448bf509432c1a19ec46ab8cbc7353c03c6280)
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2; RUN: llc < %s -mtriple=i686-- | FileCheck %s
3
4@x = external dso_local global i32                ; <ptr> [#uses=1]
5
6define i32 @test() {
7; CHECK-LABEL: test:
8; CHECK:       # %bb.0:
9; CHECK-NEXT:    movl x, %eax
10; CHECK-NEXT:    addl %eax, %eax
11; CHECK-NEXT:    retl
12        %tmp.0 = load i32, ptr @x           ; <i32> [#uses=1]
13        %tmp.1 = shl i32 %tmp.0, 1              ; <i32> [#uses=1]
14        ret i32 %tmp.1
15}
16
17