summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2013-06-29 10:28:04 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2013-06-29 10:28:04 +0000
commit5953d3712abd7b3fdb0f8442cd594350a1209204 (patch)
tree8ef70c85ea4a08ee05bacea688c6a62d4146ba2b /llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
parent92a8a7d45abc8207ee9a9c5282da7dc151aff3c7 (diff)
downloadbcm5719-llvm-5953d3712abd7b3fdb0f8442cd594350a1209204.tar.gz
bcm5719-llvm-5953d3712abd7b3fdb0f8442cd594350a1209204.zip
InstCombine: FoldGEPICmp shouldn't change sign of base pointer comparison
Changing the sign when comparing the base pointer would introduce all sorts of unexpected things like: %gep.i = getelementptr inbounds [1 x i8]* %a, i32 0, i32 0 %gep2.i = getelementptr inbounds [1 x i8]* %b, i32 0, i32 0 %cmp.i = icmp ult i8* %gep.i, %gep2.i %cmp.i1 = icmp ult [1 x i8]* %a, %b %cmp = icmp ne i1 %cmp.i, %cmp.i1 ret i1 %cmp into: %cmp.i = icmp slt [1 x i8]* %a, %b %cmp.i1 = icmp ult [1 x i8]* %a, %b %cmp = xor i1 %cmp.i, %cmp.i1 ret i1 %cmp By preserving the original sign, we now get: ret i1 false This fixes PR16483. llvm-svn: 185259
Diffstat (limited to 'llvm/lib/Transforms/Vectorize/LoopVectorize.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud