[PATCH] D32344: InstCombine/AMDGPU: Fix constant folding of llvm.amdgcn.{icmp, fcmp}
Nicolai Hähnle via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 24 10:20:53 PDT 2017
nhaehnle added inline comments.
================
Comment at: lib/Transforms/InstCombine/InstCombineCalls.cpp:3435-3437
+ if (CCmp->isNullValue())
+ return replaceInstUsesWith(
+ *II, ConstantExpr::getSExt(CCmp, II->getType()));
----------------
arsenm wrote:
> Multiline, so braces
Fixing this before I commit.
================
Comment at: test/Transforms/InstCombine/amdgcn-intrinsics.ll:1538
ret i64 %result
}
----------------
arsenm wrote:
> arsenm wrote:
> > Check that attributes 4 contains convergent?
> This is really missing nounwind?
Yes. It's an attribute of the call-site, not of the function. read_register itself is nounwind readonly, but doesn't have the convergent attribute.
https://reviews.llvm.org/D32344
More information about the llvm-commits
mailing list