[PATCH] D13235: [mips][microMIPS] Fix an issue with selecting sqrt instruction in LLVM backend

Zlatko Buljan via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 2 04:39:02 PDT 2015


zbuljan added inline comments.

================
Comment at: test/CodeGen/Mips/llvm-ir/sqrt.ll:13-15
@@ +12,4 @@
+
+; CHECK-LABEL: sqrt_fn:
+; CHECK-NOT: sqrtf
+; CHECK: sqrt
----------------
dsanders wrote:
> The CHECK-NOT doesn't quite achieve what you intended. Consider:
>   sqrt_fn:
>     ...
>     jal sqrtf
> The CHECK-LABEL will match the sqrt_fn: as intended, the CHECK will match the 'sqrt' in 'jal sqrtf'. After these two matches are made, the CHECK-NOT will check that sqrtf doesn't match between the other two matches. This will successfully find zero matches and the test will mistakenly pass.
> 
> I'd just add the registers to the instruction I want to match like so:
>   ; CHECK: sqrt $f0, $f12
> with that, no CHECK-LABEL or CHECK-NOT is necessary.
In this case, I think, there should be sqrt.s in expression:
; CHECK: sqrt.s $f0, $f12


http://reviews.llvm.org/D13235





More information about the llvm-commits mailing list