Home | History | Annotate | Download | only in GlobalDCE
      1 ; Make sure that if a pass like jump threading populates a function analysis
      2 ; like LVI with asserting handles into the body of a function, those don't begin
      3 ; to assert when global DCE deletes the body of the function.
      4 ;
      5 ; RUN: opt -disable-output < %s -passes='module(function(jump-threading),globaldce)'
      6 ; RUN: opt -disable-output < %s -passes='module(rpo-functionattrs,globaldce)'
      7 
      8 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
      9 target triple = "x86_64-unknown-linux-gnu"
     10 
     11 declare i32 @bar()
     12 
     13 define internal i32 @foo() {
     14 entry:
     15   %call4 = call i32 @bar()
     16   %cmp5 = icmp eq i32 %call4, 0
     17   br i1 %cmp5, label %if.then6, label %if.end8
     18 
     19 if.then6:
     20   ret i32 0
     21 
     22 if.end8:
     23   ret i32 1
     24 }
     25