xref: /aosp_15_r20/external/llvm/test/CodeGen/X86/2012-12-06-python27-miscompile.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=x86 -mcpu=corei7 -mtriple=i686-pc-win32 | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Workertarget datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
4*9880d681SAndroid Build Coastguard Workertarget triple = "x86_64-apple-macosx10.8.0"
5*9880d681SAndroid Build Coastguard Worker
6*9880d681SAndroid Build Coastguard Worker; Make sure that we are zeroing one memory location at a time using xorl and
7*9880d681SAndroid Build Coastguard Worker; not both using XMM registers.
8*9880d681SAndroid Build Coastguard Worker
9*9880d681SAndroid Build Coastguard Worker;CHECK: @foo
10*9880d681SAndroid Build Coastguard Worker;CHECK: xorl
11*9880d681SAndroid Build Coastguard Worker;CHECK-NOT: xmm
12*9880d681SAndroid Build Coastguard Worker;CHECK: ret
13*9880d681SAndroid Build Coastguard Workerdefine i32 @foo (i64* %so) nounwind uwtable ssp {
14*9880d681SAndroid Build Coastguard Workerentry:
15*9880d681SAndroid Build Coastguard Worker  %used = getelementptr inbounds i64, i64* %so, i32 3
16*9880d681SAndroid Build Coastguard Worker  store i64 0, i64* %used, align 8
17*9880d681SAndroid Build Coastguard Worker  %fill = getelementptr inbounds i64, i64* %so, i32 2
18*9880d681SAndroid Build Coastguard Worker  %L = load i64, i64* %fill, align 8
19*9880d681SAndroid Build Coastguard Worker  store i64 0, i64* %fill, align 8
20*9880d681SAndroid Build Coastguard Worker  %cmp28 = icmp sgt i64 %L, 0
21*9880d681SAndroid Build Coastguard Worker  %R = sext i1 %cmp28 to i32
22*9880d681SAndroid Build Coastguard Worker  ret i32 %R
23*9880d681SAndroid Build Coastguard Worker}
24