Ban rematerializable instructions with side effects.

TableGen infers unmodeled side effects on instructions without a
pattern.  Fix some instruction definitions where that was overlooked.

Also raise an error if a rematerializable instruction has unmodeled side
effects. That doen't make any sense.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141929 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jakob Stoklund Olesen
2011-10-14 01:00:49 +00:00
parent 0a951fba75
commit ccbe603869
5 changed files with 19 additions and 11 deletions

View File

@@ -2829,6 +2829,12 @@ void CodeGenDAGPatterns::InferInstructionFlags() {
InstInfo.isBitcast = IsBitcast;
InstInfo.hasSideEffects = HasSideEffects;
InstInfo.Operands.isVariadic = IsVariadic;
// Sanity checks.
if (InstInfo.isReMaterializable && InstInfo.hasSideEffects)
throw TGError(InstInfo.TheDef->getLoc(), "The instruction " +
InstInfo.TheDef->getName() +
" is rematerializable AND has unmodeled side effects?");
}
}