diff options
author | Preston Gurd <preston.gurd@intel.com> | 2013-10-01 17:02:48 +0000 |
---|---|---|
committer | Preston Gurd <preston.gurd@intel.com> | 2013-10-01 17:02:48 +0000 |
commit | a75d6cb89f1af769f22bc69addfcdad3f83c2fc9 (patch) | |
tree | 3f4d7679e0b44eff36c7a5f7fb347d746ef35897 /llvm/test/CodeGen/X86/atom-lea-addw-bug.ll | |
parent | ad4bf3db3afdaf64103eca99ec621434fa83d204 (diff) | |
download | bcm5719-llvm-a75d6cb89f1af769f22bc69addfcdad3f83c2fc9.tar.gz bcm5719-llvm-a75d6cb89f1af769f22bc69addfcdad3f83c2fc9.zip |
Add test case for PR16785.
Thanks for Dimitry Andric, Rafael Espindola, and Benjamin Kramer
for providing and progressively reducing the test case!
llvm-svn: 191782
Diffstat (limited to 'llvm/test/CodeGen/X86/atom-lea-addw-bug.ll')
-rw-r--r-- | llvm/test/CodeGen/X86/atom-lea-addw-bug.ll | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/atom-lea-addw-bug.ll b/llvm/test/CodeGen/X86/atom-lea-addw-bug.ll new file mode 100644 index 00000000000..5cda2df432f --- /dev/null +++ b/llvm/test/CodeGen/X86/atom-lea-addw-bug.ll @@ -0,0 +1,19 @@ +; RUN: llc < %s -mcpu=atom | FileCheck %s + +; ModuleID = 'bugpoint-reduced-simplified.bc' +target triple = "x86_64-apple-darwin12.5.0" + +define i32 @DoLayout() { +entry: + %tmp1 = load i16* undef, align 2 + %tmp17 = load i16* null, align 2 + %tmp19 = load i16* undef, align 2 + %shl = shl i16 %tmp19, 1 + %add55 = add i16 %tmp17, %tmp1 + %add57 = add i16 %add55, %shl + %conv60 = zext i16 %add57 to i32 + %add61 = add nsw i32 %conv60, 0 + %conv63 = and i32 %add61, 65535 + ret i32 %conv63 +; CHECK: addw +} |