[llvm] [SelectionDAG] Handle more opcodes in canCreateUndefOrPoison (PR #84921)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 12 07:25:36 PDT 2024
================
@@ -581,19 +581,41 @@ define i32 @freeze_lshr_exact(i32 %a0) nounwind {
; X86-LABEL: freeze_lshr_exact:
; X86: # %bb.0:
; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
+; X86-NEXT: shrl $8, %eax
+; X86-NEXT: retl
+;
+; X64-LABEL: freeze_lshr_exact:
+; X64: # %bb.0:
+; X64-NEXT: movl %edi, %eax
+; X64-NEXT: shrl $8, %eax
+; X64-NEXT: retq
+ %x = lshr exact i32 %a0, 3
+ %y = freeze i32 %x
+ %z = lshr i32 %y, 5
+ ret i32 %z
+}
+
+define i32 @freeze_lshr_exact_extra_use(i32 %a0, ptr %escape) nounwind {
----------------
RKSimon wrote:
pre-commit this test so we see the diff
https://github.com/llvm/llvm-project/pull/84921
More information about the llvm-commits
mailing list