aboutsummaryrefslogtreecommitdiffstats
path: root/test/Analysis/LoadVN/casts.ll
blob: 462338d0d84e07c7d405cd0e239b46c22e532d5a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
; Check to make sure that Value Numbering doesn't merge casts of different
; flavors.
; RUN: llvm-as < %s | opt -load-vn -gcse | llvm-dis | grep '[sz]ext' | wc -l | grep 2

declare void %external(int)

int %test_casts(short %x) {
  %a = sext short %x to int
  %b = zext short %x to int
  call void %external(int %a)
  ret int %b
}