diff options
| author | Nick Lewycky <nicholas@mxc.ca> | 2012-11-18 05:39:39 +0000 |
|---|---|---|
| committer | Nick Lewycky <nicholas@mxc.ca> | 2012-11-18 05:39:39 +0000 |
| commit | 3d35b45f8e709316142cd469c9e16e29b214c2a6 (patch) | |
| tree | c98dcf8f472d5199259be021b21fb5f53eb0823f /llvm/test | |
| parent | bea5a36b0166daeb8eff8f0c7a76d2f063927800 (diff) | |
| download | bcm5719-llvm-3d35b45f8e709316142cd469c9e16e29b214c2a6.tar.gz bcm5719-llvm-3d35b45f8e709316142cd469c9e16e29b214c2a6.zip | |
Don't try to calculate the alignment of an unsigned type. Fixes PR14371!
llvm-svn: 168280
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/Transforms/InstCombine/alloca.ll | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/llvm/test/Transforms/InstCombine/alloca.ll b/llvm/test/Transforms/InstCombine/alloca.ll index 50e03479f65..68a671cec88 100644 --- a/llvm/test/Transforms/InstCombine/alloca.ll +++ b/llvm/test/Transforms/InstCombine/alloca.ll @@ -94,3 +94,19 @@ entry: tail call void @f(i32* %b) ret void } + +; PR14371 +%opaque_type = type opaque +%real_type = type { { i32, i32* } } + +@opaque_global = external constant %opaque_type, align 4 + +define void @test7() { +entry: + %0 = alloca %real_type, align 4 + %1 = bitcast %real_type* %0 to i8* + call void @llvm.memcpy.p0i8.p0i8.i32(i8* %1, i8* bitcast (%opaque_type* @opaque_global to i8*), i32 8, i32 1, i1 false) + ret void +} + +declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind |

