[llvm] [GISel] Convert zext nneg to sext if it is cheaper (PR #93856)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Fri May 31 02:49:31 PDT 2024
================
@@ -101,3 +101,13 @@ entry:
%0 = urem i64 %a, %b
ret i64 %0
}
+
+define i64 @zext_nneg_i32_i64(i32 %a) {
+; RV64IM-LABEL: zext_nneg_i32_i64:
+; RV64IM: # %bb.0: # %entry
+; RV64IM-NEXT: sext.w a0, a0
+; RV64IM-NEXT: ret
+entry:
+ %b = zext nneg i32 %a to i64
+ ret i64 %b
+}
----------------
arsenm wrote:
Vector case
https://github.com/llvm/llvm-project/pull/93856
More information about the llvm-commits
mailing list