[PATCH] D23601: [TII] add new target hook isAdd

Sjoerd Meijer via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 10 15:46:05 PDT 2016


SjoerdMeijer added a comment.

Thanks for reviewing!

The 1ULL << fix has been separately committed as revision 281149.

I noticed that I missed a failing regression test: CodeGen/Hexagon/addh-sext-trunc.ll due to a change in codegen. Interestingly, it is different because now a hwloop is created.

------------

Before:
-------

.LBB0_1:                                // %for.inc.preheader
	{

  			r3:2 = combine(##262144, #0)

}
	.p2align	4
.LBB0_2:                                // %for.inc

  // =>This Inner Loop Header: Depth=1

{

  			r2 = add(r2.l, r3.h)
  			if (cmp.gt(r1, r2.new)) jump:t .LBB0_2

}

---------

After:
------

LBB0_1:                                // %for.inc.preheader
	{

  			r1 = add(r1, ##262143)

}
	{

  			r1 = lsr(r1, #18)

}
	{

  			loop0(.LBB0_2, r1)

}
	.p2align	4
.Ltmp0:                                 // Block address taken
.LBB0_2:                                // %for.inc

  // =>This Inner Loop Header: Depth=1

{

  			nop
  			nop

}	:endloop0

At a first glance, this looks correct to me. But hexagon code is completely new to me, so I don't think I can make chances here and am hoping someone can confirm this is ok.


https://reviews.llvm.org/D23601





More information about the llvm-commits mailing list