diff options
author | Dan Gohman <gohman@apple.com> | 2009-01-21 14:50:16 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-01-21 14:50:16 +0000 |
commit | 1ef4d8f7ee60f724eff2175ed22f75a60eb8d50d (patch) | |
tree | f5deef088f589e4ace600983207a55229e16185d /test/CodeGen | |
parent | 1421b7bc23f39e57052a51f4647512936f45b12f (diff) | |
download | external_llvm-1ef4d8f7ee60f724eff2175ed22f75a60eb8d50d.zip external_llvm-1ef4d8f7ee60f724eff2175ed22f75a60eb8d50d.tar.gz external_llvm-1ef4d8f7ee60f724eff2175ed22f75a60eb8d50d.tar.bz2 |
Fix a recent regression. ClrOpcode is not set for i8; for i8, if
we want to clear %ah to zero before a division, just use a
zero-extending mov to %al. This fixes PR3366.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62691 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen')
-rw-r--r-- | test/CodeGen/X86/pr3366.ll | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/CodeGen/X86/pr3366.ll b/test/CodeGen/X86/pr3366.ll new file mode 100644 index 0000000..a6f3e92 --- /dev/null +++ b/test/CodeGen/X86/pr3366.ll @@ -0,0 +1,21 @@ +; RUN: llvm-as < %s | llc -march=x86 | grep movzbl +; PR3366 + +define void @_ada_c34002a() nounwind { +entry: + %0 = load i8* null, align 1 + %1 = sdiv i8 90, %0 + %2 = icmp ne i8 %1, 3 + %3 = zext i1 %2 to i8 + %toBool449 = icmp ne i8 %3, 0 + %4 = or i1 false, %toBool449 + %5 = zext i1 %4 to i8 + %toBool450 = icmp ne i8 %5, 0 + br i1 %toBool450, label %bb451, label %bb457 + +bb451: + br label %bb457 + +bb457: + unreachable +} |