diff options
author | Bill Wendling <isanbard@gmail.com> | 2013-11-21 07:07:01 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2013-11-21 07:07:01 +0000 |
commit | ade90c9f1d01f3401a5db183a33b5a6380476a35 (patch) | |
tree | e1330ada0e63b3000a6aa6c7f44ed3efd47f902f /test | |
parent | 8ae03404a3a38e34474d29f20bf5cd6b7088ada8 (diff) | |
download | external_llvm-ade90c9f1d01f3401a5db183a33b5a6380476a35.zip external_llvm-ade90c9f1d01f3401a5db183a33b5a6380476a35.tar.gz external_llvm-ade90c9f1d01f3401a5db183a33b5a6380476a35.tar.bz2 |
Merging r195272:
------------------------------------------------------------------------
r195272 | hfinkel | 2013-11-20 12:54:55 -0800 (Wed, 20 Nov 2013) | 4 lines
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/branches/release_34@195320 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-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 c2cf981..35aabfa 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. +} + |