diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2010-01-21 07:03:21 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2010-01-21 07:03:21 +0000 |
commit | 9e26c1cc0c48bf9fed270ec9d6abdb46fbc8114c (patch) | |
tree | da8235bf04c810efecc694dc15761ffc347a9d94 /llvm/test/Transforms/ConstProp | |
parent | f2f73bf214a0b4ce7b3dc62de98144b6b00e2e05 (diff) | |
download | bcm5719-llvm-9e26c1cc0c48bf9fed270ec9d6abdb46fbc8114c.tar.gz bcm5719-llvm-9e26c1cc0c48bf9fed270ec9d6abdb46fbc8114c.zip |
Fix a crasher trying to fold each element in a comparison between two vectors
if one of the vectors didn't have elements (such as undef). Fixes PR 6096.
Fix an issue in the constant folder where fcmp (<2 x %ty>, <2 x %ty>) would
have <2 x i1> type if constant folding was successful and i1 type if it wasn't.
This exposed a related issue in the bitcode reader.
llvm-svn: 94069
Diffstat (limited to 'llvm/test/Transforms/ConstProp')
-rw-r--r-- | llvm/test/Transforms/ConstProp/constant-expr.ll | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/llvm/test/Transforms/ConstProp/constant-expr.ll b/llvm/test/Transforms/ConstProp/constant-expr.ll index eece37fa69d..996303293d1 100644 --- a/llvm/test/Transforms/ConstProp/constant-expr.ll +++ b/llvm/test/Transforms/ConstProp/constant-expr.ll @@ -57,4 +57,11 @@ @T4 = global i1* inttoptr (i64 trunc (i256 lshr (i256 or (i256 and (i256 and (i256 shl (i256 zext (i64 ptrtoint (i1* @B to i64) to i256), i256 64), i256 -6277101735386680763495507056286727952638980837032266301441), i256 6277101735386680763835789423207666416102355444464034512895), i256 shl (i256 zext (i64 ptrtoint (i1* @A to i64) to i256), i256 192)), i256 64) to i64) to i1*) ; CHECK: @T5 = global i1* @A -@T5 = global i1* inttoptr (i64 add (i64 trunc (i256 lshr (i256 or (i256 and (i256 and (i256 shl (i256 zext (i64 ptrtoint (i1* @B to i64) to i256), i256 64), i256 -6277101735386680763495507056286727952638980837032266301441), i256 6277101735386680763835789423207666416102355444464034512895), i256 shl (i256 zext (i64 ptrtoint (i1* @A to i64) to i256), i256 192)), i256 192) to i64), i64 trunc (i256 lshr (i256 or (i256 and (i256 and (i256 shl (i256 zext (i64 ptrtoint (i1* @B to i64) to i256), i256 64), i256 -6277101735386680763495507056286727952638980837032266301441), i256 6277101735386680763835789423207666416102355444464034512895), i256 shl (i256 zext (i64 ptrtoint (i1* @A to i64) to i256), i256 192)), i256 128) to i64)) to i1*)
\ No newline at end of file +@T5 = global i1* inttoptr (i64 add (i64 trunc (i256 lshr (i256 or (i256 and (i256 and (i256 shl (i256 zext (i64 ptrtoint (i1* @B to i64) to i256), i256 64), i256 -6277101735386680763495507056286727952638980837032266301441), i256 6277101735386680763835789423207666416102355444464034512895), i256 shl (i256 zext (i64 ptrtoint (i1* @A to i64) to i256), i256 192)), i256 192) to i64), i64 trunc (i256 lshr (i256 or (i256 and (i256 and (i256 shl (i256 zext (i64 ptrtoint (i1* @B to i64) to i256), i256 64), i256 -6277101735386680763495507056286727952638980837032266301441), i256 6277101735386680763835789423207666416102355444464034512895), i256 shl (i256 zext (i64 ptrtoint (i1* @A to i64) to i256), i256 192)), i256 128) to i64)) to i1*) + + + +; PR6096 + +; No check line. This used to crash llvm-as. +@T6 = global <2 x i1> fcmp ole (<2 x float> fdiv (<2 x float> undef, <2 x float> <float 1.000000e+00, float 1.000000e+00>), <2 x float> zeroinitializer) |