diff options
| author | Owen Anderson <resistor@mac.com> | 2014-03-13 22:51:43 +0000 |
|---|---|---|
| committer | Owen Anderson <resistor@mac.com> | 2014-03-13 22:51:43 +0000 |
| commit | 9b8f9c3d95c40bbe4e575929d97ad8b3cce7244e (patch) | |
| tree | de06eb3404eaa9f117a39efc06885525ff995cc2 /llvm/test/Transforms/InstCombine | |
| parent | 8c26761018f8e19bb7789dafe7f37c8442f4cf02 (diff) | |
| download | bcm5719-llvm-9b8f9c3d95c40bbe4e575929d97ad8b3cce7244e.tar.gz bcm5719-llvm-9b8f9c3d95c40bbe4e575929d97ad8b3cce7244e.zip | |
Fix a bug in InstCombine where we would incorrectly attempt to construct a
bitcast between pointers of two different address spaces if they happened to have
the same pointer size.
llvm-svn: 203862
Diffstat (limited to 'llvm/test/Transforms/InstCombine')
| -rw-r--r-- | llvm/test/Transforms/InstCombine/load-addrspace-cast.ll | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/test/Transforms/InstCombine/load-addrspace-cast.ll b/llvm/test/Transforms/InstCombine/load-addrspace-cast.ll new file mode 100644 index 00000000000..fd6339cc926 --- /dev/null +++ b/llvm/test/Transforms/InstCombine/load-addrspace-cast.ll @@ -0,0 +1,12 @@ +; RUN: opt -instcombine -S < %s | FileCheck %s +target datalayout = "e-p:64:64:64-n8:16:32:64" + +define i32* @pointer_to_addrspace_pointer(i32 addrspace(1)** %x) nounwind { +; CHECK-LABEL: @pointer_to_addrspace_pointer( +; CHECK: load +; CHECK: addrspacecast + %y = bitcast i32 addrspace(1)** %x to i32** + %z = load i32** %y + ret i32* %z +} + |

