mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-26 05:46:06 +00:00

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.
21 lines
663 B
LLVM
21 lines
663 B
LLVM
; Test Case for PR1080
|
|
; RUN: llvm-as %s -o /dev/null
|
|
; RUN: verify-uselistorder %s
|
|
|
|
@str = internal constant [4 x i8] c"-ga\00" ; <ptr> [#uses=2]
|
|
|
|
define i32 @main(i32 %argc, ptr %argv) {
|
|
entry:
|
|
%tmp65 = getelementptr ptr, ptr %argv, i32 1 ; <ptr> [#uses=1]
|
|
%tmp66 = load ptr, ptr %tmp65 ; <ptr> [#uses=0]
|
|
%cmp = icmp ne i32 sub (i32 ptrtoint (ptr getelementptr ([4 x i8], ptr @str, i32 0, i64 1) to i32), i32 ptrtoint (ptr @str to i32)), 1
|
|
br i1 %cmp, label %exit_1, label %exit_2
|
|
|
|
exit_1: ; preds = %entry
|
|
ret i32 0
|
|
|
|
exit_2: ; preds = %entry
|
|
ret i32 1
|
|
}
|
|
|