aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2012-04-27 00:54:36 +0000
committerDan Gohman <gohman@apple.com>2012-04-27 00:54:36 +0000
commit90f3798f2659ea5eecf9cd8c02353e3b295326e4 (patch)
tree3dd8eefc8019f1b547af771bc43b2130c0fdf46b /clang/lib/Frontend/CompilerInvocation.cpp
parent641a87b9832453f9186f93b3a369055641482072 (diff)
downloadllvm-90f3798f2659ea5eecf9cd8c02353e3b295326e4.zip
llvm-90f3798f2659ea5eecf9cd8c02353e3b295326e4.tar.gz
llvm-90f3798f2659ea5eecf9cd8c02353e3b295326e4.tar.bz2
Use ConstantExpr::getExtractElement when constant-folding vectors
instead of getAggregateElement. This has the advantage of being more consistent and allowing higher-level constant folding to procede even if an inner extract element cannot be folded. Make ConstantFoldInstruction call ConstantFoldConstantExpression on the instruction's operands, making it more consistent with ConstantFoldConstantExpression itself. This makes sure that ConstantExprs get TargetData-aware folding before being handed off as operands for further folding. This causes more expressions to be folded, but due to a known shortcoming in constant folding, this currently has the side effect of stripping a few more nuw and inbounds flags in the non-targetdata side of constant-fold-gep.ll. This is mostly harmless. This fixes rdar://11324230. llvm-svn: 155682
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions