This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU][MC] Corrected parsing of SP3 'neg' modifier
ClosedPublic

Authored by dp on Apr 12 2019, 10:16 AM.

Details

Summary

See bug 41156: https://bugs.llvm.org/show_bug.cgi?id=41156

This is the second part of a fix. This change corrects the following bug: constant expressions started with "-" followed by a symbol are evaluated incorrectly: the "-" sign is simply ignored.

For example, the sequence

.set foo, 1
v_mul_f32 v0, -foo+2, v2  // -foo+2 = 1?

results in the same code as the following:

v_mul_f32 v0, 3, v2

Diff Detail

Repository
rL LLVM