[PATCH] Reject bitcasts between address spaces with different sizes

Eli Friedman eli.friedman at gmail.com
Wed Jul 10 11:51:12 PDT 2013


Your code in Verifier::visitGlobalVariable isn't quite right: it's
possible to have an incorrect cast which doesn't reference a global
variable.

Your code in llvm::UpgradeGlobalVariable has the same issue.

It looks like you still didn't add code to handle global aliases.

-Eli

On Fri, Jul 5, 2013 at 3:42 PM, Matt Arsenault
<Matthew.Arsenault at amd.com> wrote:
>   Fix infinite loop when constant casts have cycles. Disable output for opt -verify
>
> Hi eli.friedman,
>
> http://llvm-reviews.chandlerc.com/D1083
>
> CHANGE SINCE LAST DIFF
>   http://llvm-reviews.chandlerc.com/D1083?vs=2702&id=2703#toc
>
> Files:
>   docs/LangRef.rst
>   include/llvm/AutoUpgrade.h
>   lib/AsmParser/LLParser.cpp
>   lib/Bitcode/Reader/BitcodeReader.cpp
>   lib/IR/AutoUpgrade.cpp
>   lib/IR/Verifier.cpp
>   test/Bitcode/bitcast-upgrade.ll
>   test/Transforms/InstCombine/memset2.ll
>   test/Verifier/bitcast-address-space-nested-global-cycle.ll
>   test/Verifier/bitcast-address-space-nested-global.ll
>   test/Verifier/bitcast-address-space-through-gep-2.ll
>   test/Verifier/bitcast-address-space-through-gep.ll
>   test/Verifier/bitcast-address-spaces.ll
>   test/Verifier/bitcast-vector-pointer-as.ll



More information about the llvm-commits mailing list