diff options
author | Hal Finkel <hfinkel@anl.gov> | 2013-11-20 20:54:55 +0000 |
---|---|---|
committer | Hal Finkel <hfinkel@anl.gov> | 2013-11-20 20:54:55 +0000 |
commit | 1e816423661f5dc201cdd433cbfdee1c46958ea8 (patch) | |
tree | 99a3cfe33fd66a865048fd5bc4833332cfb30c63 /test/CodeGen | |
parent | aefd8db6342318a1c6b55f38e1e4449cdddd0f63 (diff) | |
download | llvm-1e816423661f5dc201cdd433cbfdee1c46958ea8.tar.gz llvm-1e816423661f5dc201cdd433cbfdee1c46958ea8.tar.bz2 llvm-1e816423661f5dc201cdd433cbfdee1c46958ea8.tar.xz |
PPC popcnt[dw] do not have record forms
The instruction definitions incorrectly specified that popcntd and popcntw have
record forms; they do not. This mistake was causing invalid code generation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195272 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen')
-rw-r--r-- | test/CodeGen/PowerPC/optcmp.ll | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/CodeGen/PowerPC/optcmp.ll b/test/CodeGen/PowerPC/optcmp.ll index c2cf98174f..35aabfa52c 100644 --- a/test/CodeGen/PowerPC/optcmp.ll +++ b/test/CodeGen/PowerPC/optcmp.ll @@ -134,3 +134,19 @@ entry: ; CHECK-NOT: fsubs. 0, 1, 2 ; CHECK: stfs 0, 0(5) } + +declare i64 @llvm.ctpop.i64(i64); + +define signext i64 @fooct(i64 signext %a, i64 signext %b, i64* nocapture %c) #0 { +entry: + %sub = sub nsw i64 %a, %b + %subc = call i64 @llvm.ctpop.i64(i64 %sub) + store i64 %subc, i64* %c, align 4 + %cmp = icmp sgt i64 %subc, 0 + %cond = select i1 %cmp, i64 %a, i64 %b + ret i64 %cond + +; CHECK: @fooct +; CHECK-NOT: popcntd. +} + |