[PATCH] D32344: InstCombine/AMDGPU: Fix constant folding of llvm.amdgcn.{icmp, fcmp}
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 21 11:59:07 PDT 2017
arsenm added inline comments.
================
Comment at: lib/Transforms/InstCombine/InstCombineCalls.cpp:3406
+ ConstantExpr::getSExt(CCmp, II->getType()));
+ } else {
+ Value *NewF = Intrinsic::getDeclaration(II->getModule(),
----------------
No else
================
Comment at: lib/Transforms/InstCombine/InstCombineCalls.cpp:3410-3413
+ Metadata *MDArgs[] = { MDString::get(II->getContext(), "exec") };
+ MDNode *MD = MDNode::get(II->getContext(), MDArgs);
+ Value *Args[] = { MetadataAsValue::get(II->getContext(), MD) };
+ CallInst *NewCall = Builder->CreateCall(NewF, Args);
----------------
Should have a comment about why this is done
================
Comment at: test/Transforms/InstCombine/amdgcn-intrinsics.ll:1538
ret i64 %result
}
----------------
Check that attributes 4 contains convergent?
https://reviews.llvm.org/D32344
More information about the llvm-commits
mailing list