xref: /minix3/external/bsd/llvm/dist/llvm/test/CodeGen/PowerPC/2011-12-08-DemandedBitsMiscompile.ll (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc; RUN: llc < %s -mtriple=powerpc64-unknown-linux-gnu -mcpu=g4 | FileCheck %s
2*f4a2713aSLionel Sambuc
3*f4a2713aSLionel Sambucdefine void @test(i32* nocapture %x, i64* %xx, i32* %yp) nounwind uwtable ssp {
4*f4a2713aSLionel Sambucentry:
5*f4a2713aSLionel Sambuc  %yy = load i32* %yp
6*f4a2713aSLionel Sambuc  %y = add i32 %yy, 1
7*f4a2713aSLionel Sambuc  %z = zext i32 %y to i64
8*f4a2713aSLionel Sambuc  %z2 = shl i64 %z, 32
9*f4a2713aSLionel Sambuc  store i64 %z2, i64* %xx, align 4
10*f4a2713aSLionel Sambuc  ret void
11*f4a2713aSLionel Sambuc
12*f4a2713aSLionel Sambuc; CHECK-LABEL: test:
13*f4a2713aSLionel Sambuc; CHECK: sldi {{.*}}, {{.*}}, 32
14*f4a2713aSLionel Sambuc; Note: it's okay if someday CodeGen gets smart enough to optimize out
15*f4a2713aSLionel Sambuc; the shift.
16*f4a2713aSLionel Sambuc}
17