[PATCH] D33860: [AMDGPU] Untangle SDWA pass from SIShrinkInstructions
Stanislav Mekhanoshin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 3 09:18:03 PDT 2017
rampitec added inline comments.
================
Comment at: lib/Target/AMDGPU/SIPeepholeSDWA.cpp:261
Mods |= Abs ? SISrcMods::ABS : 0;
- Mods |= Neg ? SISrcMods::NEG : 0;
+ Mods ^= Neg ? SISrcMods::NEG : 0;
} else if (Sext) {
----------------
SamWot wrote:
> Why do you use XOR here?
You can set neg modifier yoyrself, but it also can be present in the original instruction on the same operand. The right effective modifier is exactly xor of them.
Repository:
rL LLVM
https://reviews.llvm.org/D33860
More information about the llvm-commits
mailing list