<feed xmlns='http://www.w3.org/2005/Atom'>
<title>bcm5719-llvm/llvm/test/Transforms/InstCombine, branch meklort-10.0.1</title>
<subtitle>Project Ortega BCM5719 LLVM</subtitle>
<id>https://git.raptorcs.com/git/bcm5719-llvm/atom?h=meklort-10.0.1</id>
<link rel='self' href='https://git.raptorcs.com/git/bcm5719-llvm/atom?h=meklort-10.0.1'/>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/'/>
<updated>2020-06-24T01:45:59+00:00</updated>
<entry>
<title>[InstCombine] prevent infinite loop with sub/abs of constant expression</title>
<updated>2020-06-24T01:45:59+00:00</updated>
<author>
<name>Tom Stellard</name>
<email>tstellar@redhat.com</email>
</author>
<published>2020-05-09T00:34:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=be4501f6e487fc27b242e0799cfeed3b4eedc4cd'/>
<id>urn:sha1:be4501f6e487fc27b242e0799cfeed3b4eedc4cd</id>
<content type='text'>
PR45539:
https://bugs.llvm.org/show_bug.cgi?id=45539

(cherry picked from commit 01bcc3e9371470e1974f066ced353df15e10056d)
</content>
</entry>
<entry>
<title>[WinEH] Fix inttoptr+phi optimization in presence of catchswitch</title>
<updated>2020-03-02T10:38:20+00:00</updated>
<author>
<name>Reid Kleckner</name>
<email>rnk@google.com</email>
</author>
<published>2020-03-01T15:47:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=0bf4795d069642afe2a430521f3549e425f092c9'/>
<id>urn:sha1:0bf4795d069642afe2a430521f3549e425f092c9</id>
<content type='text'>
getFirstInsertionPt's return value must be checked for validity before
casting it to Instruction*. Don't attempt to insert casts after a phi in
a catchswitch block.

Fixes PR45033, introduced in D37832.

Reviewed By: davidxl, hfinkel

Differential Revision: https://reviews.llvm.org/D75381

(cherry picked from commit 1adbe86d87bd4ecffc73ab17c7da56f44816f424)
</content>
</entry>
<entry>
<title>[InstCombine] foldShiftIntoShiftInAnotherHandOfAndInICmp(): fix miscompile (PR44802)</title>
<updated>2020-02-27T12:45:21+00:00</updated>
<author>
<name>Roman Lebedev</name>
<email>lebedev.ri@gmail.com</email>
</author>
<published>2020-02-25T14:24:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=b2b41bc3b51a083fb9e36e50d0131dfbd79e00ce'/>
<id>urn:sha1:b2b41bc3b51a083fb9e36e50d0131dfbd79e00ce</id>
<content type='text'>
Much like with reassociateShiftAmtsOfTwoSameDirectionShifts(),
as input, we have the following pattern:
  icmp eq/ne (and ((x shift Q), (y oppositeshift K))), 0
We want to rewrite that as:
  icmp eq/ne (and (x shift (Q+K)), y), 0  iff (Q+K) u&lt; bitwidth(x)

While we know that originally (Q+K) would not overflow
(because  2 * (N-1) u&lt;= iN -1), we may have looked past extensions of
shift amounts. so it may now overflow in smaller bitwidth.

To ensure that does not happen, we need to ensure that the total maximal
shift amount is still representable in that smaller bitwidth.
If the overflow would happen, (Q+K) u&lt; bitwidth(x) check would be bogus.

https://bugs.llvm.org/show_bug.cgi?id=44802
(cherry picked from commit 2855c8fed9326ec44526767f1596a4fe4e55dc70)
</content>
</entry>
<entry>
<title>[NFC][InstCombine] Add shift amount reassociation in bittest miscompile example from PR44802</title>
<updated>2020-02-27T12:45:21+00:00</updated>
<author>
<name>Roman Lebedev</name>
<email>lebedev.ri@gmail.com</email>
</author>
<published>2020-02-25T14:14:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=ac293ede5e62cfc569f2d5d8f4667e6188afced0'/>
<id>urn:sha1:ac293ede5e62cfc569f2d5d8f4667e6188afced0</id>
<content type='text'>
https://bugs.llvm.org/show_bug.cgi?id=44802
(cherry picked from commit 6f807ca00d951d3e74f7ea4fe1daa8e3560f4c0d)
</content>
</entry>
<entry>
<title>[InstCombine] reassociateShiftAmtsOfTwoSameDirectionShifts(): fix miscompile (PR44802)</title>
<updated>2020-02-27T12:45:21+00:00</updated>
<author>
<name>Roman Lebedev</name>
<email>lebedev.ri@gmail.com</email>
</author>
<published>2020-02-25T13:48:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=f115a88191c3dc80c5140fbbf63f74ca77fcc74b'/>
<id>urn:sha1:f115a88191c3dc80c5140fbbf63f74ca77fcc74b</id>
<content type='text'>
As input, we have the following pattern:
  Sh0 (Sh1 X, Q), K
We want to rewrite that as:
  Sh x, (Q+K)  iff (Q+K) u&lt; bitwidth(x)
While we know that originally (Q+K) would not overflow
(because  2 * (N-1) u&lt;= iN -1), we may have looked past extensions of
shift amounts. so it may now overflow in smaller bitwidth.

To ensure that does not happen, we need to ensure that the total maximal
shift amount is still representable in that smaller bitwidth.
If the overflow would happen, (Q+K) u&lt; bitwidth(x) check would be bogus.

https://bugs.llvm.org/show_bug.cgi?id=44802
(cherry picked from commit 781d077afb0ed9771c513d064c40170c1ccd21c9)
</content>
</entry>
<entry>
<title>[NFC][InstCombine] Add shift amount reassociation miscompile example from PR44802</title>
<updated>2020-02-27T12:45:21+00:00</updated>
<author>
<name>Roman Lebedev</name>
<email>lebedev.ri@gmail.com</email>
</author>
<published>2020-02-25T13:06:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=77e448c0d3a87e7944381d7d53e55c997c8b936a'/>
<id>urn:sha1:77e448c0d3a87e7944381d7d53e55c997c8b936a</id>
<content type='text'>
https://bugs.llvm.org/show_bug.cgi?id=44802
(cherry picked from commit 425ef999385058143bb927aefe81daddcd43f623)
</content>
</entry>
<entry>
<title>[InstCombine] Fix infinite min/max canonicalization loop (PR44541)</title>
<updated>2020-02-10T10:29:25+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>nikita.ppv@gmail.com</email>
</author>
<published>2020-02-02T16:40:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=fc12083cbc5caa0e60a8e12bab9c34f71a4b31b1'/>
<id>urn:sha1:fc12083cbc5caa0e60a8e12bab9c34f71a4b31b1</id>
<content type='text'>
While D72944 also fixes https://bugs.llvm.org/show_bug.cgi?id=44541,
it does so in a more roundabout manner and there might be other
loopholes to trigger the same issue. This is a more direct fix,
that prevents the transform if the min/max is based on a
non-canonical sub X, 0 instruction.

Differential Revision: https://reviews.llvm.org/D73849

(cherry picked from commit a148b9e9909db6a592609eb35b4de38c9e67cb8b)
</content>
</entry>
<entry>
<title>[InstCombine] Support disabling expensive combines in opt</title>
<updated>2020-02-10T10:28:33+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>nikita.ppv@gmail.com</email>
</author>
<published>2020-01-16T20:03:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=d9b836dc6f78c5fb1f1b425943e1335b235b32d8'/>
<id>urn:sha1:d9b836dc6f78c5fb1f1b425943e1335b235b32d8</id>
<content type='text'>
Currently, there is no way to disable ExpensiveCombines when doing
a standalone opt -instcombine run, as that's the default, and the
opt option can currently only be used to force enable, not to force
disable. The only way to disable expensive combines is via -O1 or -O2,
but that of course also runs the rest of the kitchen sink...

This patch allows using opt -instcombine -expensive-combines=0 to
run InstCombine without ExpensiveCombines.

Differential Revision: https://reviews.llvm.org/D72861

(cherry picked from commit 2ca092f3209579fde7a38ade511c1bbcef213c36)
</content>
</entry>
<entry>
<title>[InstCombine] Add test for -expensive-combines option; NFC</title>
<updated>2020-02-10T10:28:17+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>nikita.ppv@gmail.com</email>
</author>
<published>2020-01-16T20:02:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=d65ef4321e6f244e68b191c84b8c76fb06662573'/>
<id>urn:sha1:d65ef4321e6f244e68b191c84b8c76fb06662573</id>
<content type='text'>
This shows that -expensive-combines=0 is ignored.

(cherry picked from commit 2d0d4235a282e0f900d31ac1054aafc0c526245c)
</content>
</entry>
<entry>
<title>[InstCombine] Fix infinite loop in min/max load/store bitcast combine (PR44835)</title>
<updated>2020-02-10T10:23:13+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>nikita.ppv@gmail.com</email>
</author>
<published>2020-02-08T11:04:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=9db3e5d5156bc2a3ba8ec0d70ab7069a82472fbb'/>
<id>urn:sha1:9db3e5d5156bc2a3ba8ec0d70ab7069a82472fbb</id>
<content type='text'>
Fixes https://bugs.llvm.org/show_bug.cgi?id=44835. Skip the transform
if it wouldn't actually do anything (apart from removing and reinserting
the same instructions).

Note that the test case doesn't loop on current master anymore, only
on the LLVM 10 release branch. The issue is already mitigated on master
due to worklist order fixes, but we should fix the root cause there as well.

As a side note, we should probably assert in combineLoadToNewType()
that it does not combine to the same type. Not doing this here, because
this assertion would also be triggered in another place right now.

Differential Revision: https://reviews.llvm.org/D74278

(cherry picked from commit 23db9724d0e5490fa5a2a726acf015f84e2c87cf)
</content>
</entry>
</feed>
