Home | History | Annotate | Download | only in PowerPC
      1 ; RUN: llc --mtriple=powerpc64le-linux-gnu < %s | FileCheck %s
      2 
      3 ; It tests in function DAGCombiner::visitSIGN_EXTEND_INREG
      4 ; signext will not be combined with extload, and causes extra zext.
      5 
      6 declare void @g(i32 signext)
      7 
      8 define void @foo(i8* %p) {
      9 entry:
     10   br label %while.body
     11 
     12 while.body:
     13   %0 = load i8, i8* %p, align 1
     14   %conv = zext i8 %0 to i32
     15   %cmp = icmp sgt i8 %0, 0
     16   br i1 %cmp, label %if.then, label %while.body
     17 ; CHECK:     lbz
     18 ; CHECK:     extsb.
     19 ; CHECK-NOT: rlwinm
     20 ; CHECK:     ble
     21 
     22 if.then:
     23   tail call void @g(i32 signext %conv)
     24   br label %while.body
     25 }
     26 
     27