• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc -disable-constant-hoisting < %s | FileCheck %s
2target datalayout = "e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128"
3target triple = "i386-unknown-linux-gnu"
4
5@d = global i32 8, align 4
6
7define i32 @main() {
8entry:
9  %load = load i32, i32* @d, align 4
10  %conv1 = zext i32 %load to i64
11  %shl = shl i64 %conv1, 1
12  %mul = and i64 %shl, 4294967312
13  %cmp = icmp ugt i64 4294967295, %mul
14  %zext = zext i1 %cmp to i32
15  ret i32 %zext
16}
17; CHECK: main:
18; CHECK:   movl    d, %[[load:.*]]
19; CHECK:   movl    %[[load]], %[[copy:.*]]
20; CHECK:   shrl    $31, %[[copy]]
21; CHECK:   addl    %[[load]], %[[load]]
22