[llvm-commits] [llvm] r171733 - in /llvm/trunk: lib/AsmParser/LLParser.cpp test/Feature/const_pv.ll test/Transforms/EarlyCSE/commute.ll test/Transforms/LoopIdiom/X86/popcnt.ll
David Tweed
david.tweed at arm.com
Mon Jan 7 05:32:38 PST 2013
Author: davidtweed
Date: Mon Jan 7 07:32:38 2013
New Revision: 171733
URL: http://llvm.org/viewvc/llvm-project?rev=171733&view=rev
Log:
There was a switch fall-through in the parser for textual LLVM that caused
bogus comparison operands to default to eq/oeq. Fix that, fix a couple of
tests that accidentally passed and test for bogus comparison opeartors
explicitly.
Modified:
llvm/trunk/lib/AsmParser/LLParser.cpp
llvm/trunk/test/Feature/const_pv.ll
llvm/trunk/test/Transforms/EarlyCSE/commute.ll
llvm/trunk/test/Transforms/LoopIdiom/X86/popcnt.ll
Modified: llvm/trunk/lib/AsmParser/LLParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/LLParser.cpp?rev=171733&r1=171732&r2=171733&view=diff
==============================================================================
--- llvm/trunk/lib/AsmParser/LLParser.cpp (original)
+++ llvm/trunk/lib/AsmParser/LLParser.cpp Mon Jan 7 07:32:38 2013
@@ -3120,7 +3120,7 @@
bool LLParser::ParseCmpPredicate(unsigned &P, unsigned Opc) {
if (Opc == Instruction::FCmp) {
switch (Lex.getKind()) {
- default: TokError("expected fcmp predicate (e.g. 'oeq')");
+ default: return TokError("expected fcmp predicate (e.g. 'oeq')");
case lltok::kw_oeq: P = CmpInst::FCMP_OEQ; break;
case lltok::kw_one: P = CmpInst::FCMP_ONE; break;
case lltok::kw_olt: P = CmpInst::FCMP_OLT; break;
@@ -3140,7 +3140,7 @@
}
} else {
switch (Lex.getKind()) {
- default: TokError("expected icmp predicate (e.g. 'eq')");
+ default: return TokError("expected icmp predicate (e.g. 'eq')");
case lltok::kw_eq: P = CmpInst::ICMP_EQ; break;
case lltok::kw_ne: P = CmpInst::ICMP_NE; break;
case lltok::kw_slt: P = CmpInst::ICMP_SLT; break;
Modified: llvm/trunk/test/Feature/const_pv.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Feature/const_pv.ll?rev=171733&r1=171732&r2=171733&view=diff
==============================================================================
--- llvm/trunk/test/Feature/const_pv.ll (original)
+++ llvm/trunk/test/Feature/const_pv.ll Mon Jan 7 07:32:38 2013
@@ -4,5 +4,5 @@
@G1 = global i8 zeroinitializer
@g = constant <2 x i8*> getelementptr (<2 x i8*> <i8* @G1, i8* @G1>, <2 x i32> <i32 0, i32 0>)
- at t = constant <2 x i1> icmp ((<2 x i32> ptrtoint (<2 x i8*> zeroinitializer to <2 x i32>), <2 x i32> zeroinitializer )
+ at t = constant <2 x i1> icmp eq (<2 x i32> ptrtoint (<2 x i8*> zeroinitializer to <2 x i32>), <2 x i32> zeroinitializer )
Modified: llvm/trunk/test/Transforms/EarlyCSE/commute.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/EarlyCSE/commute.ll?rev=171733&r1=171732&r2=171733&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/EarlyCSE/commute.ll (original)
+++ llvm/trunk/test/Transforms/EarlyCSE/commute.ll Mon Jan 7 07:32:38 2013
@@ -19,9 +19,9 @@
; CHECK-NEXT: store
; CHECK-NEXT: store
; CHECK-NEXT: ret
- %C = fcmp eq float %A, %B
+ %C = fcmp oeq float %A, %B
store i1 %C, i1* %PA
- %D = fcmp eq float %B, %A
+ %D = fcmp oeq float %B, %A
store i1 %D, i1* %PB
ret void
}
Modified: llvm/trunk/test/Transforms/LoopIdiom/X86/popcnt.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LoopIdiom/X86/popcnt.ll?rev=171733&r1=171732&r2=171733&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/LoopIdiom/X86/popcnt.ll (original)
+++ llvm/trunk/test/Transforms/LoopIdiom/X86/popcnt.ll Mon Jan 7 07:32:38 2013
@@ -1,5 +1,5 @@
; RUN: opt -loop-idiom < %s -mtriple=x86_64-apple-darwin -mcpu=corei7 -S | FileCheck %s
-
+booom
;To recognize this pattern:
;int popcount(unsigned long long a) {
; int c = 0;
More information about the llvm-commits
mailing list