diff options
author | Hal Finkel <hfinkel@anl.gov> | 2015-07-11 11:04:54 +0000 |
---|---|---|
committer | Hal Finkel <hfinkel@anl.gov> | 2015-07-11 11:04:54 +0000 |
commit | ef28aad9f4a93ba4afa846837109fcca5e68889a (patch) | |
tree | 073097e0a1c0aff695df683a29778b89513fc7d6 /llvm/test/Analysis/BasicAA/bug.23540.ll | |
parent | 9cf58c40951598431878e8853c9ce1ecefe523dd (diff) | |
download | bcm5719-llvm-ef28aad9f4a93ba4afa846837109fcca5e68889a.tar.gz bcm5719-llvm-ef28aad9f4a93ba4afa846837109fcca5e68889a.zip |
Revert "Revert r236894 "[BasicAA] Fix zext & sext handling""
r236894 caused PR23626 (Clang miscompiles webkit's base64 decoder), and was
reverted in r237984. This reapplies the patch with an additional test case for
PR23626 and the associated fix (both scales and offsets in the
BasicAliasAnalysis::constantOffsetHeuristic should initially be zero).
Patch by Nick White, thanks!
llvm-svn: 241981
Diffstat (limited to 'llvm/test/Analysis/BasicAA/bug.23540.ll')
-rw-r--r-- | llvm/test/Analysis/BasicAA/bug.23540.ll | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/llvm/test/Analysis/BasicAA/bug.23540.ll b/llvm/test/Analysis/BasicAA/bug.23540.ll new file mode 100644 index 00000000000..f693bcf73cd --- /dev/null +++ b/llvm/test/Analysis/BasicAA/bug.23540.ll @@ -0,0 +1,17 @@ +; RUN: opt < %s -basicaa -aa-eval -print-all-alias-modref-info -disable-output 2>&1 | FileCheck %s +target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" +target triple = "x86_64-unknown-linux-gnu" + +@c = external global i32 + +; CHECK-LABEL: f +; CHECK: PartialAlias: i32* %arrayidx, i32* %arrayidx6 +define void @f() { + %idxprom = zext i32 undef to i64 + %add4 = add i32 0, 1 + %idxprom5 = zext i32 %add4 to i64 + %arrayidx6 = getelementptr inbounds i32, i32* @c, i64 %idxprom5 + %arrayidx = getelementptr inbounds i32, i32* @c, i64 %idxprom + ret void +} + |