mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-02 07:11:49 +00:00
missed cast elimination
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34490 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2ad9f17fee
commit
082228b884
@ -1,6 +1,6 @@
|
||||
; Tests to make sure elimination of casts is working correctly
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -disable-output &&
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | not grep '\([sz]ext\)\|\(trunc\)'
|
||||
; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | not grep '\([sz]ext\)\|\(trunc\)|\(ptrtoint\)'
|
||||
|
||||
target pointersize = 32
|
||||
|
||||
@ -13,3 +13,9 @@ sbyte* %test1(sbyte* %t) {
|
||||
ret sbyte* %tv
|
||||
}
|
||||
|
||||
bool %test2(sbyte* %a, sbyte* %b) {
|
||||
%tmpa = cast sbyte* %a to uint
|
||||
%tmpb = cast sbyte* %b to uint
|
||||
%r = seteq uint %tmpa, %tmpb
|
||||
ret bool %r
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user