[PATCH] D157513: [X86] Fix aliasing check between a TargetFrameIndex and a FrameIndex

Nabeel Omer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 17 02:48:39 PDT 2023


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGd06608060c8f: [X86] Fix aliasing check between TargetFrameIndex and FrameIndex (authored by n-omer).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D157513/new/

https://reviews.llvm.org/D157513

Files:
  llvm/lib/CodeGen/SelectionDAG/SelectionDAGAddressAnalysis.cpp
  llvm/test/CodeGen/X86/pr63645.ll


Index: llvm/test/CodeGen/X86/pr63645.ll
===================================================================
--- llvm/test/CodeGen/X86/pr63645.ll
+++ llvm/test/CodeGen/X86/pr63645.ll
@@ -17,6 +17,8 @@
 ; CHECK:       # %bb.0: # %entry
 ; CHECK-NEXT:    movl $0, c(%rip)
 ; CHECK-NEXT:    movq $64, p(%rip)
+; CHECK-NEXT:    movabsq $214787019555673, %rax # imm = 0xC3590000C359
+; CHECK-NEXT:    movq %rax, -{{[0-9]+}}(%rsp)
 ; CHECK-NEXT:    cmpl $42828, -{{[0-9]+}}(%rsp) # imm = 0xA74C
 ; CHECK-NEXT:    jg .LBB0_2
 ; CHECK-NEXT:  # %bb.1: # %if.then.1.i
Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGAddressAnalysis.cpp
===================================================================
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAGAddressAnalysis.cpp
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGAddressAnalysis.cpp
@@ -130,7 +130,7 @@
       MachineFrameInfo &MFI = DAG.getMachineFunction().getFrameInfo();
       // If the base are the same frame index but the we couldn't find a
       // constant offset, (indices are different) be conservative.
-      if (A != B && (!MFI.isFixedObjectIndex(A->getIndex()) ||
+      if (A->getIndex() != B->getIndex() && (!MFI.isFixedObjectIndex(A->getIndex()) ||
                      !MFI.isFixedObjectIndex(B->getIndex()))) {
         IsAlias = false;
         return true;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D157513.551057.patch
Type: text/x-patch
Size: 1325 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230817/6c531612/attachment.bin>


More information about the llvm-commits mailing list