[PATCH] Reject bitcasts between address spaces with different sizes

Matt Arsenault Matthew.Arsenault at amd.com
Wed Jul 3 20:48:10 PDT 2013


  Handle bitcasts in constant global initializers. Cleanup DataLayout handling.

  I tried to forbid casts between same sized address spaces and it made many InstCombine tests angry, so I don't think I'll be doing that.

  This now will fail verification on a bitcast involving a non-zero address space when there is no datalayout, and the error says so. Is this an acceptable way to handle that?

  Vectors of pointers still need to be handled and tested, but I think that requires some of the other changes I'll be making later.

Hi eli.friedman,

http://llvm-reviews.chandlerc.com/D1083

CHANGE SINCE LAST DIFF
  http://llvm-reviews.chandlerc.com/D1083?vs=2671&id=2680#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-address-space-nested-global-cycle.ll
  test/Bitcode/bitcast-address-space-nested-global.ll
  test/Bitcode/bitcast-upgrade.ll
  test/Bitcode/bitcast.ll
  test/Transforms/InstCombine/memset2.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D1083.4.patch
Type: text/x-patch
Size: 24388 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130703/049fe2b1/attachment.bin>


More information about the llvm-commits mailing list