[llvm] [PowerPC] Combine sub within setcc back to sext (PR #66978)
Qiu Chaofan via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 9 19:44:29 PDT 2024
================
@@ -171,12 +164,13 @@ entry:
define zeroext i1 @test10(i16 %a) {
; CHECK-LABEL: test10:
; CHECK: # %bb.0: # %entry
-; CHECK-NEXT: addi 3, 3, -128
-; CHECK-NEXT: lis 4, -1
+; CHECK-NEXT: clrlwi 4, 3, 16
+; CHECK-NEXT: extsb 3, 3
; CHECK-NEXT: clrlwi 3, 3, 16
-; CHECK-NEXT: ori 4, 4, 256
-; CHECK-NEXT: add 3, 3, 4
-; CHECK-NEXT: rldicl 3, 3, 1, 63
+; CHECK-NEXT: xor 3, 4, 3
+; CHECK-NEXT: cntlzw 3, 3
+; CHECK-NEXT: srwi 3, 3, 5
+; CHECK-NEXT: xori 3, 3, 1
; CHECK-NEXT: blr
----------------
ecnelises wrote:
This should not be regression. Parameter should have `signext`.
https://github.com/llvm/llvm-project/pull/66978
More information about the llvm-commits
mailing list