[PATCH] D42287: [GlobalISel][X86] Fixing failures after https://reviews.llvm.org/D37775

Alexander Ivchenko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 22 00:57:00 PST 2018


aivchenk added inline comments.


================
Comment at: test/CodeGen/X86/GlobalISel/x86_64-legalize-GV.mir:2
 # RUN: llc -mtriple=x86_64-linux-gnu -global-isel -run-pass=legalizer %s -o - | FileCheck %s --check-prefix=ALL --check-prefix=X64
-# RUN: llc -mtriple=i386-linux-gnu   -global-isel -run-pass=legalizer %s -o - | FileCheck %s --check-prefix=ALL --check-prefix=X32
 --- |
 
----------------
qcolombet wrote:
> What is the rational for separating the two variants?
The reason was that MIR generated from the given IR for x86 and x86_64 is different. Namely the last two lines of MIR:

    %eax = COPY %0(p0)
    RET 0, implicit %eax

For X86_64 it is:

    %rax = COPY %0(p0)
    RET 0, implicit %rax

I was not sure about the best approach here, but splitting seemed reasonable, because we have different input MIR. As far as I see, just removing MIR part at all and relying on IR is not a desirable approach as it is less robust generally


https://reviews.llvm.org/D42287





More information about the llvm-commits mailing list