1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -S -passes=ipsccp | FileCheck %s
5 ; IPSCCP should propagate the 0 argument, eliminate the switch, and propagate
8 define i32 @main() noreturn nounwind {
11 ; CHECK-NEXT: ret i32 123
14 %call2 = tail call i32 @wwrite(i64 0) nounwind
18 define internal i32 @wwrite(i64 %i) nounwind readnone willreturn {
19 ; CHECK-LABEL: @wwrite(
21 ; CHECK-NEXT: br label [[SW_DEFAULT:%.*]]
23 ; CHECK-NEXT: ret i32 undef
26 switch i64 %i, label %sw.default [
38 ; CHECK: attributes #0 = { noreturn nounwind }
39 ; CHECK: attributes #1 = { nounwind willreturn memory(none) }