
Remove support for zext and sext constant expressions. All places creating them have been removed beforehand, so this just removes the APIs and uses of these constant expressions in tests. There is some additional cleanup that can be done on top of this, e.g. we can remove the ZExtInst vs ZExtOperator footgun. This is part of https://discourse.llvm.org/t/rfc-remove-most-constant-expressions/63179.
20 lines
525 B
LLVM
20 lines
525 B
LLVM
; RUN: llvm-as %s -o - | llvm-dis > %t1.ll
|
|
; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
|
|
; RUN: diff %t1.ll %t2.ll
|
|
|
|
define void @"NewCasts" (i17 %x) {
|
|
%a = zext i17 %x to i32
|
|
%b = sext i17 %x to i32
|
|
%c = trunc i17 %x to i8
|
|
%d = uitofp i17 %x to float
|
|
%e = sitofp i17 %x to double
|
|
%f = fptoui float %d to i17
|
|
%g = fptosi double %e to i17
|
|
%i = fpext float %d to double
|
|
%j = fptrunc double %i to float
|
|
%k = bitcast i32 %a to float
|
|
%l = inttoptr i17 %x to i32*
|
|
%m = ptrtoint i32* %l to i64
|
|
ret void
|
|
}
|