Home | History | Annotate | Download | only in InstSimplify
      1 ; RUN: opt < %s -instsimplify -S | FileCheck %s
      2 
      3 declare double @llvm.powi.f64(double, i32) nounwind readonly
      4 declare i32 @llvm.bswap.i32(i32)
      5 
      6 ; A
      7 define i32 @test_bswap(i32 %a) nounwind {
      8 ; CHECK-LABEL: @test_bswap(
      9 ; CHECK-NEXT:    ret i32 %a
     10 ;
     11   %tmp2 = tail call i32 @llvm.bswap.i32( i32 %a )
     12   %tmp4 = tail call i32 @llvm.bswap.i32( i32 %tmp2 )
     13   ret i32 %tmp4
     14 }
     15 
     16 define void @powi(double %V, double *%P) {
     17   %B = tail call double @llvm.powi.f64(double %V, i32 0) nounwind
     18   store volatile double %B, double* %P
     19 
     20   %C = tail call double @llvm.powi.f64(double %V, i32 1) nounwind
     21   store volatile double %C, double* %P
     22 
     23   ret void
     24 ; CHECK-LABEL: @powi(
     25 ; CHECK: store volatile double 1.0
     26 ; CHECK: store volatile double %V
     27 }
     28