
Remove support for the icmp and fcmp constant expressions. This is part of: https://discourse.llvm.org/t/rfc-remove-most-constant-expressions/63179 As usual, many of the updated tests will no longer test what they were originally intended to -- this is hard to preserve when constant expressions get removed, and in many cases just impossible as the existence of a specific kind of constant expression was the cause of the issue in the first place.
15 lines
449 B
LLVM
15 lines
449 B
LLVM
; RUN: opt -S -passes=instcombine < %s | FileCheck %s
|
|
%S = type { i16, i32 }
|
|
|
|
define <2 x i16> @test1() {
|
|
entry:
|
|
%c = icmp eq i16 extractelement (<2 x i16> bitcast (<1 x i32> <i32 1> to <2 x i16>), i32 0), 0
|
|
%s = select i1 %c, %S zeroinitializer, %S { i16 0, i32 1 }
|
|
%e = extractvalue %S %s, 0
|
|
%b = insertelement <2 x i16> <i16 undef, i16 0>, i16 %e, i32 0
|
|
ret <2 x i16> %b
|
|
}
|
|
|
|
; CHECK-LABEL: @test1(
|
|
; CHECK: ret <2 x i16> zeroinitializer
|