[PowerPC] Handle cmp op promotion for SELECT[_CC] nodes in PPCTL::DAGCombineExtBoolTrunc
[oota-llvm.git] / test / CodeGen / PowerPC / rm-zext.ll
index 1e60d1198bc50366dae973cbe07e258154379b94..8fab38ad4cf0867960ce09ffcf2ff5039503e2fe 100644 (file)
@@ -28,5 +28,16 @@ entry:
 ; CHECK: blr
 }
 
+define zeroext i32 @min(i32 zeroext %a, i32 zeroext %b) #0 {
+entry:
+  %cmp = icmp ule i32 %a, %b
+  %cond = select i1 %cmp, i32 %a, i32 %b
+  ret i32 %cond
+
+; CHECK-LABEL @min
+; CHECK-NOT: rldicl 3, {{[0-9]+}}, 0, 32
+; CHECK: blr
+}
+
 attributes #0 = { nounwind readnone }