diff options
| author | Preston Gurd <preston.gurd@intel.com> | 2013-01-11 22:06:56 +0000 |
|---|---|---|
| committer | Preston Gurd <preston.gurd@intel.com> | 2013-01-11 22:06:56 +0000 |
| commit | 99c6990457e8e365f0d966602d5ad2f9783bec5c (patch) | |
| tree | 776ca4a01958e1c904a053068cf892fef6ebb8f2 /llvm/test/CodeGen | |
| parent | 632af24eb8ecbc157bfcb178511c17be2fea7486 (diff) | |
| download | bcm5719-llvm-99c6990457e8e365f0d966602d5ad2f9783bec5c.tar.gz bcm5719-llvm-99c6990457e8e365f0d966602d5ad2f9783bec5c.zip | |
Update patch for the pad short functions pass for Intel Atom (only).
Adds a check for -Oz, changes the code to not re-visit BBs,
and skips over DBG_VALUE instrs.
Patch by Andy Zhang.
llvm-svn: 172258
Diffstat (limited to 'llvm/test/CodeGen')
| -rw-r--r-- | llvm/test/CodeGen/X86/atom-pad-short-functions.ll | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/atom-pad-short-functions.ll b/llvm/test/CodeGen/X86/atom-pad-short-functions.ll index 54af17d4c4f..b9a39e08cb5 100644 --- a/llvm/test/CodeGen/X86/atom-pad-short-functions.ll +++ b/llvm/test/CodeGen/X86/atom-pad-short-functions.ll @@ -22,6 +22,13 @@ define i32 @test_optsize(i32 %a) nounwind optsize { ret i32 %a } +define i32 @test_minsize(i32 %a) nounwind minsize { +; CHECK: test_minsize +; CHECK: movl +; CHECK-NEXT: ret + ret i32 %a +} + define i32 @test_add(i32 %a, i32 %b) nounwind { ; CHECK: test_add ; CHECK: addl @@ -76,3 +83,21 @@ if.end: ret void } + +define void @test_branch_to_same_bb(i32 %x, i32 %y) nounwind { +; CHECK: @test_branch_to_same_bb + %cmp = icmp sgt i32 %x, 0 + br i1 %cmp, label %while.cond, label %while.end + +while.cond: + br label %while.cond + +; CHECK: nop +; CHECK: nop +; CHECK: nop +; CHECK: nop +; CHECK: ret +while.end: + ret void +} + |

