Skip to content

Commit dd9f977

Browse files
authored
Handle constant of vector of i1 (#1704)
1 parent 012da6b commit dd9f977

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

enzyme/Enzyme/TypeAnalysis/TypeAnalysis.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -747,6 +747,9 @@ void getConstantAnalysis(Constant *Val, TypeAnalyzer &TA,
747747
delete g2;
748748

749749
int Off = (int)ai.getLimitedValue();
750+
if (auto VT = dyn_cast<VectorType>(Val->getType()))
751+
if (VT->getElementType()->isIntegerTy(1))
752+
Off = i / 8;
750753

751754
getConstantAnalysis(Op, TA, analysis);
752755
auto mid = analysis[Op];

0 commit comments

Comments
 (0)