mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-19 04:29:21 +00:00
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47110 91177308-0d34-0410-b5e6-96231b3b80d8
14 lines
374 B
LLVM
14 lines
374 B
LLVM
; Check to make sure that Value Numbering doesn't merge casts of different
|
|
; flavors.
|
|
; RUN: llvm-as < %s | opt -load-vn -gcse | llvm-dis | \
|
|
; RUN: grep {\[sz\]ext} | count 2
|
|
|
|
declare void @external(i32)
|
|
|
|
define i32 @test_casts(i16 %x) {
|
|
%a = sext i16 %x to i32 ; <i32> [#uses=1]
|
|
%b = zext i16 %x to i32 ; <i32> [#uses=1]
|
|
call void @external( i32 %a )
|
|
ret i32 %b
|
|
}
|