[PATCH] Fix for codegen bug that could cause illegal cmn instruction generation
Duncan P. N. Exon Smith
dexonsmith at apple.com
Mon Apr 14 12:56:06 PDT 2014
On Apr 14, 2014, at 12:38 PM, Louis Gerbarg <lgg at apple.com> wrote:
> I am attaching new versions of the patches. Comments inline below.
>
> Louis
>
> <0001-Add-a-flag-to-disable-the-ARM64DeadRegisterDefinitio.patch><0002-Fix-for-codegen-bug-that-could-cause-illegal-cmn-ins.patch>
LGTM, after you fix another couple of style issues I spotted.
> @@ -0,0 +1,17 @@
> +; RUN: llc -march=arm64 -arm64-dead-def-elimination=false < %s | FileCheck %s
> +
> +target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
> +target triple = "arm64-apple-ios7.0.0"
> +
You have lots of space characters on that "blank" line.
> +; Function Attrs: nounwind ssp uwtable
> +define i32 @test1() #0 {
> + %tmp1 = alloca i8
> + %tmp2 = icmp eq i8* %tmp1, null
> + %tmp3 = zext i1 %tmp2 to i32
> +
> + ret i32 %tmp3
> +
> + ; CHECK-LABEL: test1
> + ; CHECK: adds {{x[0-9]+}}, sp, #15
> +}
> +
You have an extra newline at the end of the file.
I think git diff --check would tell you about both of these.
> @@ -57,12 +57,27 @@ bool ARM64DeadRegisterDefinitions::implicitlyDefinesSubReg(
> return false;
> }
>
> +bool ARM64DeadRegisterDefinitions::usesFrameIndex(const MachineInstr *MI) {
> + for (int i = MI->getDesc().getNumDefs(), e = MI->getNumOperands(); i != e; ++i) {
Variable names should be uppercase: I and E (sorry I missed this
before).
More information about the llvm-commits
mailing list