diff options
| author | Craig Topper <craig.topper@gmail.com> | 2017-06-04 07:30:28 +0000 |
|---|---|---|
| committer | Craig Topper <craig.topper@gmail.com> | 2017-06-04 07:30:28 +0000 |
| commit | fe9ad82e440be345e3a54991b6c646b43c4a0a32 (patch) | |
| tree | 26013047e0cedb2900ed17555777d0bca12ce4ef /llvm/lib/Analysis | |
| parent | 97f113e79551484257d040f0bb84b1b8efa06249 (diff) | |
| download | bcm5719-llvm-fe9ad82e440be345e3a54991b6c646b43c4a0a32.tar.gz bcm5719-llvm-fe9ad82e440be345e3a54991b6c646b43c4a0a32.zip | |
[ConstantFolding] Properly support constant folding of vector powi intrinsic. The second argument is not a vector so needs special treatment.
llvm-svn: 304679
Diffstat (limited to 'llvm/lib/Analysis')
| -rw-r--r-- | llvm/lib/Analysis/ConstantFolding.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/ConstantFolding.cpp b/llvm/lib/Analysis/ConstantFolding.cpp index d33fe4a0094..b8e80eaedd9 100644 --- a/llvm/lib/Analysis/ConstantFolding.cpp +++ b/llvm/lib/Analysis/ConstantFolding.cpp @@ -2036,7 +2036,8 @@ Constant *ConstantFoldVectorCall(StringRef Name, unsigned IntrinsicID, for (unsigned J = 0, JE = Operands.size(); J != JE; ++J) { // These intrinsics use a scalar type for their second argument. if (J == 1 && - (IntrinsicID == Intrinsic::cttz || IntrinsicID == Intrinsic::ctlz)) { + (IntrinsicID == Intrinsic::cttz || IntrinsicID == Intrinsic::ctlz || + IntrinsicID == Intrinsic::powi)) { Lane[J] = Operands[J]; continue; } |

