brintos

brintos / llvm-project-archived public Read only

0
0
Text · 612 B · deacc2b Raw
31 lines · plain
1; RUN: opt < %s -S -passes=ipsccp | FileCheck %s2; PR55963 4; IPSCCP should propagate the 0 argument, eliminate the switch, and propagate5; the result.6 7; CHECK: define i32 @main() #0 {8; CHECK-NEXT: entry:9; CHECK-NEXT: %call2 = tail call i32 @wwrite(i64 0) [[NUW:#[0-9]+]]10; CHECK-NEXT: ret i32 12311 12define i32 @main() noreturn nounwind {13entry:14  %call2 = tail call i32 @wwrite(i64 0) nounwind15  ret i32 %call216}17 18define internal i32 @wwrite(i64 %i) nounwind {19entry:20  switch i64 %i, label %sw.default [21    i64 3, label %return22    i64 10, label %return23  ]24 25sw.default:26  ret i32 12327 28return:29  ret i32 030}31